Files
PhilandClaude Opus 5.5 c9506e2db0 Deploys always pull images; dockcheck recreates only what it updated
Compose deploys used the default pull policy (missing), so switching a
service to a tag that was already cached deployed a year-old image
(paperless-ngx and heyform :latest). module_defaults now sets pull: always
for every docker_compose_v2 task.

dockcheck pulls the image it updates, but then ran compose up for the
whole stack, which could recreate other containers in the stack from
cached images, including ones it excludes. OnlySpecific=true limits it to
the updated container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 20:35:50 -07:00
..
2026-10-31 08:34:14 -06:00

Cron Role

Cron jobs on the server (tag cron). "Cron jobs" in this repo always means jobs on the server, never on the machine running Ansible.

Jobs

Time User Job
08:00 daily phil ~/.local/bin/run_dockcheck.sh: container updates
09:10 daily root /usr/local/bin/update_warhammer_feed.sh: Warhammer RSS feed

Dockcheck (container updates)

  • dockcheck is a git clone in /home/phil/.local/share/dockcheck, linked as ~/.local/bin/dockcheck.sh. It updates itself every run (AutoSelfUpdate: git pull, which also updates its notify templates and urls.list). Ansible only makes the first clone.
  • regctl (~/.local/bin/regctl), which dockcheck uses to query registries, is refreshed weekly from its latest release by run_dockcheck.sh.
  • /home/phil/.config/dockcheck.config comes from dockcheck.config.j2 (Gotify token from vault_dockcheck).
  • At 08:00 run_dockcheck.sh runs dockcheck twice:
    1. Update run: containers labelled mag37.dockcheck.update=true are pulled and recreated. No notification.
    2. Check run: every container is checked and one Gotify notice lists the updates still waiting (unlabelled containers, and images held back by DaysOld).
  • DaysOld=3: images newer than 3 days wait for a later run.
  • BackupForDays=7: the replaced image is kept for 7 days for rollback. List backups with dockcheck.sh -B; to roll back, retag the backup and recreate the container.
  • dawarich_db and dawarich_redis are skipped.
  • Logs go to /var/log/dockcheck/dockcheck.log, rotated weekly (a year kept).

To see what needs updating by hand (checks everything, changes nothing, sends nothing):

ssh phil@100.70.169.99 '~/.local/bin/dockcheck.sh'

Warhammer RSS feed

update_warhammer_feed.sh runs the git.thesatelliteoflove.com/phil/rss-warhammer container to build warhammer_rss_feed.xml and copies it to /opt/stacks/caddy/site/tsol/feeds/, where Caddy serves it on the main site.

Adding a job

Add a cron task to tasks/main.yml (copy the script with copy first if it needs one), then bin/deploy --tags cron.