Ansible playbook to provision my/kenneth's main laptop. The layout follows Ansible best practices.
If you run these plays on your machine YOUR BOX WILL BE RECONFIGURED AND YOU MIGHT NOT LIKE IT!
I/kenneth am currently running Xubuntu 24.04, so many of the Ansible tasks use apt(itude). You could easily adapt this for other Debian releases or fork/modify it for rpm based distros.
This project starts with a very small bootstrap script whose only job is to install the minimum tooling required to run the real workstation setup.
The actual workstation automation now lives under ansible/.
It currently installs:
- git
- python3
- python3-pip
- pipx
- ansible-core (via pipx)
Fresh (X)ubuntu installs may not include curl by default. That’s annoying, but not a crisis. Install it first:
sudo apt update && sudo apt install -y curlFast, optimistic, and a little irresponsible:
curl -fsSL https://raw.githubusercontent.com/kpb/ansible-local-devbox/main/bootstrap/bootstrap.sh | bashCowardly, but wise:
curl -fsSL https://raw.githubusercontent.com/kpb/ansible-local-devbox/main/bootstrap/bootstrap.sh -o bootstrap.sh
less bootstrap.sh
bash bootstrap.sh- Ubuntu/Xubuntu only for now
- uses
aptfor base packages - uses
pipxto installansible-core - safe to rerun
- small on purpose, because bootstrap scripts should know their place
When you’re ready to let the machine make some choices for you:
ansible-playbook -K ansible/devbox.ymlIf you only want one corner of the circus, run a single role by tag:
ansible-playbook -K ansible/devbox.yml --tags basics
ansible-playbook -K ansible/devbox.yml --tags dockerMany roles assume basics has already run, because it installs shared system
packages and foundational setup. If you are running individual role tags on a
fresh machine, run --tags basics,<role> or run the full playbook first.
If you just want the maintenance pass:
ansible-playbook -K ansible/devbox.yml --tags upgradeManual tasks. Writing these down so I don't forget.
- SSH Keys. Need these for GitHub, deploying, etc.
-
Use an @upgrade tag to make it safe and easy to upgrade.
-
Install Vagrant
-
clean up unused ansible files generated by
ansible-galaxy
