Ansible playbooks to personalise your base dev account
Find a file
2026-08-18 19:30:22 +02:00
.idea feat: initial commit 2026-08-05 11:34:16 +02:00
files feat: add git hall alias to gitconfig 2026-08-18 18:21:43 +02:00
.gitconfig feat: initial commit 2026-08-05 11:34:16 +02:00
ansible.cfg feat: initial commit 2026-08-05 11:34:16 +02:00
basic-setup.yaml feat: initial commit 2026-08-05 11:34:16 +02:00
check-password.yaml feat: add playbook to check for password 2026-08-18 19:30:22 +02:00
inventory.yaml feat: initial commit 2026-08-05 11:34:16 +02:00
README.md feat: add playbook to check for password 2026-08-18 19:30:22 +02:00

Ansible playbooks to personalise your base dev account

This just reflects my personal approach, but it might be helpful for others as a template to personalise their own accounts.

Requirements

Ansible

Make sure to have ansible installed:

uv venv .venv
source .venv/bin/activate
uv pip install ansible

SSH config

This setup assumes that you have your SSH client configured so that you can log in on all machines with a single ssh machine-name (so username, port and ssh key file are set appropriately). You can generate the relevant config settings (which you then need to add to your ~/.ssh/config) with the following bash script (replacing the username and the path to your public SSH key with yours):

USERNAME=aklaura
KEYPATH=/home/jackie/.ssh/id_ed25519_uniak
for host in $(grep ansible_host inventory.yaml | cut -f2 -d: | cut -f1 -d.); do
  echo -e "Host $host $host.uni-ak.ac.at\n    HostName $host.uni-ak.ac.at\n    Port 2200\n    User $USERNAME\n    IdentityFile $KEYPATH\n"
done

Adaptation

  • Adapt at least the name and e-mail in the files/gitconfig.
  • In the inventory.yaml you might want to adapt the all: host group to only include the tiers you have accounts for.
  • The rest is personal preference.

Execution

Once everything is nicely configured run the playbook:

ansible-playbook -i inventory.yaml basic-setup.yaml

Checking for passwords

If you want to check, whether your password works (assuming you have sudo), do the following:

ansible-playbook -i inventory.yaml check-password.yaml --ask-become-pass

In the play recap all hosts where the password worked should be marked yellow. All those where it did not work are red with 1 failed task.