Ansible playbooks and roles that I use to provision my Linux-based machines.
This repository is currently tested against Xubuntu 24.04, but most roles should work with any Ubuntu flavor running the same version.
- Git
- Python venv module
The installation steps below take care of bootstrapping a default (X)Ubuntu installation.
Run the installation script and follow its instructions:
wget -q -O - https://raw.githubusercontent.com/flaudisio/linux-setup-playbook/refs/heads/main/install.sh | bashNotice that
curlmay not be available in vanilla Ubuntu installations.
The script will:
- Install Git and Python's venv module package (
python3-venv) - Clone this repository
- Install Ansible in a virtualenv and download the required collections/roles to the cloned folder
You can override variables defined in config.default.yml (or define new ones) by creating a config.yml
file.
Example:
# Customize the list of installed packages
packages_apt_install:
- htop
- jq
- vim
packages_pipx_install:
- pre-commit
# Clear the custom Docker daemon options by setting an empty object
docker_daemon_options: {}For all available options, see the roles' variable files in the local roles folder.
Run the setup playbook:
cd ~/.local/share/linux-setup-playbook
./run.sh main.ymlThe run.sh script is a tiny wrapper for the ansible-playbook command. By default it uses
the --become --ask-become-pass arguments, so your user must be able to use sudo (which is default
on clean Ubuntu installations).
Use ansible-playbook's flags like --tags (shorthand: -t) to run only specific tasks, enable check
mode and so on.
Example:
./run.sh main.yml --list-tasks
./run.sh main.yml -t backup -t spotify
./run.sh main.yml -t packages -t restic
./run.sh main.yml -t spotify --diff -CThis project is heavily inspired by Jeff Geerling's great Mac Development Ansible Playbook.