- Pin dockcheck (v0.8.3) and regctl (v0.11.7) and re-download on version bumps; get_url never replaced existing files, and dockcheck never updates regctl itself (server had regctl v0.8.3 from June 2025) - New options: DaysOld=3, BackupForDays=7 (rollback), MaxAsync=10, MonoMode for the log, PrintReleaseURL with upstream urls.list - Drop authentik-postgresql-1 from Exclude (container is gone) - Wrapper logged exit code 0 always ($? read after $(date)); fixed - Rotate /var/log/dockcheck/dockcheck.log weekly - Remove stale ~/.local/bin/notify_v2.sh Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
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)
- Installs dockcheck, its Gotify notify
templates,
urls.listandregctlinto/home/phil/.local/bin/, pinned todockcheck_versionandregctl_versionindefaults/main.yml. Bump those and runbin/deploy --tags cronto upgrade. - Templates
/home/phil/.config/dockcheck.configfromdockcheck.config.j2(Gotify token fromvault_dockcheck). - Settings:
OnlyLabel=trueandAutoMode=true, so containers labelledmag37.dockcheck.update=trueare pulled and recreated automatically; any other container with an update gets a Gotify notice.dawarich_dbanddawarich_redisare skipped. 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 withdockcheck.sh -B(ordocker images | grep _); to roll back, retag the backup and recreate the container.run_dockcheck.shlogs to/var/log/dockcheck/dockcheck.log, rotated weekly (a year kept).
To see what needs updating by hand, run dockcheck on the server:
ssh phil@100.70.169.99 '~/.local/bin/dockcheck.sh -n'
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.