Ansible dotfiles
Today I added my dotfiles to my
ansible repository.
I also self host my repository on a private server with
forgejo.
Now I have al my configuration in one place.
Note: the cvdg.eu domain is owned by me, but it is private and not accessible from the public internet.
homelab
To install the dotfiles in my homelab:
ansible-playbook playbooks/install.yml -t dotfiles
ansible pull
To configure my desktop, I can now use ansible-pull:
ansible-pull -U http://git.cvdg.eu:3000/homelab/ansible.git -i inventory/localhost.yml playbooks/dotfiles.yml
output
$ ansible-pull -U http://git.cvdg.eu:3000/homelab/ansible.git -i inventory/localhost.yml playbooks/dotfiles.yml
Starting Ansible Pull at 2025-08-23 15:09:11
/usr/bin/ansible-pull -U http://git.cvdg.eu:3000/homelab/ansible.git -i inventory/localhost.yml playbooks/dotfiles.yml
[WARNING]: Could not match supplied host pattern, ignoring: laptop01
localhost | SUCCESS => {
"after": "3e3af37e2a6fae68eeb7fc59e50ed0660d8c5d38",
"before": "3e3af37e2a6fae68eeb7fc59e50ed0660d8c5d38",
"changed": false,
"remote_url_changed": false
}
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: laptop01
PLAY [Install local] ***********************************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [dotfiles : Create ~/.local/bash/] ****************************************
ok: [localhost]
TASK [dotfiles : ~/.bashrc] ****************************************************
ok: [localhost]
TASK [dotfiles : Templates ~/.local/bash/] *************************************
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/10-bashrc.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/40-alias.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/40-cargo.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/40-env.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/40-path.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/50-zoxide.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/51-git-prompt.sh.j2)
ok: [localhost] => (item=/home/cees/.ansible/pull/laptop01/roles/dotfiles/templates/bash/60-prompt.sh.j2)
TASK [dotfiles : Create ~/.gitconfig] ******************************************
ok: [localhost]
TASK [dotfiles : Remove ~/.gitconfig"] *****************************************
ok: [localhost]
TASK [dotfiles : Create ~/.ssh/] ***********************************************
ok: [localhost]
TASK [dotfiles : Create ~/.ssh/master/] ****************************************
ok: [localhost]
TASK [dotfiles : Create ~/.ssh/config] *****************************************
ok: [localhost]
TASK [dotfiles : Create ~/.ssh/authorized_keys] ********************************
ok: [localhost]
TASK [dotfiles : Create ~/.vimrc] **********************************************
ok: [localhost]
PLAY RECAP *********************************************************************
localhost : ok=11 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0