1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 15:01:59 +01:00
Sway acid dark
Go to file
2020-05-13 18:30:54 +02:00
docker/archlinux updated docker config 2020-05-11 18:41:59 +02:00
group_vars fix https://github.com/osa1/tiny/issues/192 2020-05-11 09:28:06 +02:00
roles added backup timer 2020-05-13 18:27:32 +02:00
screenshots updated snapshots 2020-05-11 16:52:19 +02:00
toolbox toolbox buster upgrade role 2019-12-02 14:31:23 +01:00
vagrant
.gitignore
.gitmodules submodule removed 2020-04-26 18:51:22 +02:00
.travis.yml updated docker config 2020-05-11 18:41:59 +02:00
ansible.cfg ignore errors on install packages 2019-12-01 17:35:51 +01:00
hosts.template added localhost to hosts template 2020-04-27 10:07:21 +02:00
install.yml updated vpn, backup services and waybar config 2020-05-13 18:19:40 +02:00
README.md updated README 2020-05-12 12:46:46 +02:00
TODO updated TODO 2020-05-13 18:30:54 +02:00

Sway Acid Dark

Build Status

Sway fish pure waybar neovim

alt tag

Tiny irc client

alt tag

Firefox/Tabliss Wofi

alt tag

Connman/Thunar GTK Theme

alt tag

Why dotfiles with Ansible ?

  • Modularity: Roles as modules
  • Factorization: Configuration files templated with jinja2 which use includes
  • Simplicity: It only requires SSH on distant hosts, and can work locally too, ansible is available via pip.
  • Flexibility: Push your dotfiles from/to any hosts you manage
  • Toolbox: Dry-run mode, diff mode, files/vars encryption with Ansible-vault, tags...

Test VMs|Containers

Please check vagrant/*/README.md and docker/*/README.md

Docs

Please look at roles/*/README.md if exists for specific hosts configuration.

How to

** Use carefully** backup your home before using !
You can use --check to dry-run and --diff to see what could change.

1. Fork Me!

2. Clone your repo on a personal host

git clone --recursive https://github.com/[your_repo]/dotfiles
cd dotfiles

3. Generate ssh keys

ssh-keygen -t rsa

4. Replace your ssh key in authorized_keys role

!!! Use as is, you will add my SSH key in your authorized_keys !!!

cp ~/.ssh/id_rsa.pub dotfiles/roles/authorized_keys/id_rsa.pub

5. Generate hosts file with your managed hosts

hosts file is defaultly gitignored.

cd dotfiles
cp hosts.template hosts

Add your hosts in right sections

  • server : install only cli tools
  • desktop : install graphic environment
  • laptop : install desktop + some extra packages

Please explicitly define an ansible_user which will receive configurations

[server]
server1 ansible_user=root
[laptop]
host1 ansible_user=user
[desktop]
host2 ansible_user=user2

6. Deploy SSH keys on nodes

Node per node if password differ between users. It adds your public ssh keys on hosts.

ansible-playbook install.yml -t init_ssh -l host1 --ask-pass
ansible-playbook install.yml -t init_ssh -l host2 --ask-pass
ansible-playbook install.yml -t init_ssh -l host3 --ask-pass

7. Run ansible-playbook

For runs on hosts configured with root user You can use without providing extra passwords

ansible-playbook install.yml -l server

For hosts configured with non-root user User needs to be in sudoers. You need to use -K|--ask-become-pass to ask sudo password, and -l to limit to that host

ansible-playbook install.yml -l host1 --ask-become-pass --ask-vault-pass

Extra commands

To list tasks and tags

ansible-playbook install.yml --list-tasks

To limit to a tag

ansible-playbook install.yml -K -t <tag>

To dry-run and print files diff on all declared hosts

ansible-playbook install.yml -l host1 -CDK

Local run

Add localhost line and user in right hosts file section

[server]
[laptop]
localhost ansible_connection=local ansible_user=user
[desktop]
ansible-playbook install.yml -l localhost -K --ask-vault-pass

Previously