Skip to content

kpb/ansible-local-devbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Local Devbox

jealous

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.

Bootstrap

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)

Prerequisite: install curl

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 curl

Run bootstrap

Fast, optimistic, and a little irresponsible:

curl -fsSL https://raw.githubusercontent.com/kpb/ansible-local-devbox/main/bootstrap/bootstrap.sh | bash

Cowardly, 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

Notes

  • Ubuntu/Xubuntu only for now
  • uses apt for base packages
  • uses pipx to install ansible-core
  • safe to rerun
  • small on purpose, because bootstrap scripts should know their place

Running

When you’re ready to let the machine make some choices for you:

ansible-playbook -K ansible/devbox.yml

If 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 docker

Many 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 upgrade

Manual Set Up

Manual tasks. Writing these down so I don't forget.

  • SSH Keys. Need these for GitHub, deploying, etc.

TODO

  • Use an @upgrade tag to make it safe and easy to upgrade.

  • Install Vagrant

  • clean up unused ansible files generated by ansible-galaxy

About

Ansible provisioning scripts for laptop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors