Playbooks

The playbooks of ansible/ apply the roles to the workstations of the inventory. make deploy runs site.yml; PLAYBOOK=obs selects obs.yml. The Ansible guide covers the inventory, the per-host settings and the make targets; each role's README covers its variables.

PlaybookPurpose
site.ymlConfigure the whole workstation: packages, system, home.
obs.ymlInstall and configure OBS Studio only.

Common pre-tasks

Both playbooks start with the same steps, tagged always, so they run whatever tags are passed:

  1. tasks/target.yml gathers the facts as the SSH user, not as root, so user_id, user_dir and env describe the account whose home the roles configure. It then stops if the machine reports another hostname than its inventory name, because its host_vars describe other monitors and packages.
  2. A check of the distribution.
  3. The package group selection (include_role of packages, tasks_from: selection). It only reads the host, and sets packages_selected_groups for the roles that read it.

site.yml

Supports Arch Linux and CachyOS, Debian and Ubuntu, and Fedora. The play escalates with become; the home roles run with become: false.

OrderRoleTagsRuns when
1package_managerpackage_managernot plan
2packagespackagesalways
3lactsystem, lactnot plan
4gamingsystem, gamingnot plan, Arch Linux, 21_steam selected
5package_servicessystem, package_servicesnot plan
6dockersystem, docker, package_servicesnot plan, 12_containers_docker selected
7hardeningsystem, hardeningnot plan
8dnssystem, dnsnot plan
9vpnsystem, vpnnot plan, 23_vpn selected
10gpusystem, gpu, gpu_modulesnot plan
11cpu_powersystem, cpu_power, amd_cpu_performancenot plan
12time_syncsystem, time_syncnot plan
13power_savesystem, power_savenot plan
14wireless_regdomsystem, wireless_regdomnot plan, Arch Linux
15gnome_keyringsystem, gnome_keyringnot plan, Arch Linux, gnome_keyring_pam_enabled
16dotfilesdotfilesalways
17audiodotfiles, audionot plan
18agent_clidotfiles, agent_clialways
19obsobs22_obs selected
20print3d3dprintnot plan, Arch Linux, 24_3dprint selected

"not plan" means packages_action is not plan. make plan sets it: the run prints the package plan and changes nothing. The system tag selects every role that came from the former system role, plus the makepkg tasks of package_manager. The roles also have finer tags of their own, listed in their README; make tags prints them all.

The main README lists the tags with what each one does.

Handlers

Changed files notify their handlers: Mako and Waybar reload, the audio services reload or restart (the SwayOSD server restarts with them), and active user units whose definitions changed restart after daemon-reload. Service jobs are queued without waiting, so a successful play confirms submission, not service health: check systemctl --user --failed afterwards.

Examples

make deploy BECOME_PASS=1
make check TAGS=dotfiles
make deploy TAGS=packages,gaming BECOME_PASS=1
make deploy BECOME_PASS=1 ANSIBLE_ARGS="-e packages_action=reconcile"

obs.yml

An OBS-only profile for a machine that should get OBS and nothing else. It runs the packages role with 22_obs plus the GPU groups detected by lspci, then the obs role, and skips every other role.

  • It requires Arch Linux or CachyOS: the OBS packages are only defined there.
  • packages_state_merge_selection: true adds these groups to the saved selection of the workstation instead of replacing it.
  • It refuses packages_action=reconcile, which would treat every other managed package as obsolete. This check runs before the facts are gathered. Reconcile with site.yml instead.
  • A selected *-dkms package also brings the headers of the running kernel; the package that owns /usr/lib/modules/<kernel>/vmlinuz names them (for example linux-zen-headers).
make deploy PLAYBOOK=obs BECOME_PASS=1

make install-obs is the same command.