Files
cloud-ip-validator/deploy/ansible/roles/validator_agent/tasks/main.yml
T
ayurishchevandClaude Opus 5.5 d0ab6b94f9 Ansible: deliver validator-agent from the artreg registry instead of building on each host
The role resolves image_tag to a digest once per run and pulls that image
on every validator before replacing the container; the git and build
steps are gone. scripts/publish-agent-image.sh builds and pushes the
agent image (<rev12> and latest tags).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:59:33 +03:00

29 lines
980 B
YAML

---
# Порядок важен: сначала всё, что не трогает работающий контейнер (проверки,
# скачивание образа), и только потом замена контейнера. Если что-то упало до
# replace, старый контейнер продолжает работать.
- name: Preflight checks
ansible.builtin.import_tasks: preflight.yml
tags: [preflight]
- name: Dry run stops after preflight
ansible.builtin.debug:
msg: "check mode: pull, replace and verify are skipped"
when: ansible_check_mode
tags: [always]
- name: Pull the image
ansible.builtin.import_tasks: pull.yml
when: not ansible_check_mode
tags: [pull]
- name: Replace the container
ansible.builtin.import_tasks: replace.yml
when: not ansible_check_mode
tags: [replace]
- name: Verify the new container
ansible.builtin.import_tasks: verify.yml
when: not ansible_check_mode
tags: [verify]