Updating the clients
Clients never change by themselves. Every change, from a Debian security update to a new homepage, goes into a new image that you build, test and then promote.
Run the ansible-playbook commands from your configuration repository. Add
--ask-vault-pass if you haven't set up a vault password file.
The routine
-
Build a staging image. This also happens automatically every week (see Scheduled builds).
bashansible-playbook nickmous.netstation.image_build -
Check what changed compared with production.
image_buildshows this at the end; after a scheduled build, run:bashansible-playbook nickmous.netstation.image_diffIt lists updated, added and removed packages, and the changes to the files netstation puts in the image (settings, Firefox policies, scripts). It also copies both versions to
build/image-diff/in your configuration repository, to open in a diff viewer you install yourself:bashgit diff --no-index build/image-diff/production build/image-diff/staging meld build/image-diff/production build/image-diff/stagingOn the server,
sudo netstation-image diffshows the same, colored and paged likegit diff. -
Test it: reboot the test client. It boots staging by default; its boot menu also lets you pick production. (No test client yet? See Test clients.)
-
Promote it. Clients switch to it on their next reboot.
bashansible-playbook nickmous.netstation.image_promote
Rolling back
Something wrong after all? Roll back to the previous production image:
ansible-playbook nickmous.netstation.image_rollback
# or pick one from the status list:
ansible-playbook nickmous.netstation.image_rollback -e netstation_rollback_build=20261015T0300ZRolling back archives the current production image, so running it twice
brings you back to where you started. The server keeps the last
netstation_releases_keep (default 3) production images.
Scheduled builds
The server builds a fresh staging image every Sunday at 03:00, to pick up Debian security updates. Promoting it stays a manual decision. With alerts on, you get a message when it's ready, with what changed.
netstation_staging_build_enabled: true
netstation_staging_build_schedule: "Sun *-*-* 03:00:00" # systemd OnCalendarA failed build never touches production. See The scheduled staging build failed.
Which changes need a new image
Settings that end up on the clients need a new image; settings for the
server only need the server playbook. Configuration
has the full table.