Files
ansible/site.yml
T
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

14 lines
472 B
YAML

- import_playbook: deploy-guard.yml
- hosts: docker
become: true
# Always fetch each image tag from the registry before compose up. The
# default only pulls missing images, so a tag that was already cached (say
# :latest from a year ago) got deployed as-is.
module_defaults:
community.docker.docker_compose_v2:
pull: always
roles:
- { role: common, tags: ["common"] }
- { role: docker, tags: ["docker"] }
- { role: cron, tags: ["cron"] }