docker/archlinux | ||
group_vars | ||
roles | ||
screenshots | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
ansible.cfg | ||
hosts.template | ||
install.yml | ||
README.md | ||
TODO |
Sway Acid Dark
Sway fish pure waybar neovim
Tiny irc client
Firefox/Tabliss Wofi
Connman/Thunar GTK Theme
Why Ansible ?
- Modularity: Roles as modules.
- Factorization: It uses jinja2 templating engine.
- Simplicity: No agent, only SSH, available via pip.
- Flexibility: Push your dotfiles from/to any hosts.
- Toolbox: Dry-run mode, diff mode, secrets encryption, tags...
How to
Use carefully, backup your home before using !
You should use --check
and --diff
to dryrun first.
Check details in roles/*/README.md
.
1. Fork Me!
2. Clone your repo
Use recursive mode to get aur ansible module for Archlinux.
git clone --recursive https://github.com/*/dotfiles
3. Configure inventory
Create inventory file from template.
cd dotfiles
cp hosts.template hosts
Add your hostnames in section:
- cli: install only cli tools
- desktop: install cli tools + desktop environment
Define which user will get configurations with ansible_user var.
Users needs to be sudoers.
desktop hosts can't use root.
a. localhost run
I will use a trick here to let ansible think that i use 2 hosts.
It will configure root with cli and user with desktop environment.
That trick needs -K
without -b
when running playbook.
[cli]
cli_user ansible_connection=local ansible_user=root
[desktop]
desktop ansible_connection=local ansible_user=user
b. multiple hosts run
[cli]
server1 ansible_user=root
[desktop]
host1 ansible_user=user
host2 ansible_user=user2
4. Configure vars
You can configure desktop environment in group_vars/all.yml
5. Configure SSH
Push your SSH public key on all your users@hosts
ssh-copy-id -i path/to/ssh/key.pub user@host
6. (Dry)Run
ansible-playbook install.yml -CD
ansible-playbook install.yml
To configure cli tools for root on desktop hosts
ansible-playbook install.yml -b -K -l desktop