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>
This commit is contained in:
1 parent
65c6975a24
commit
d0ab6b94f9
16 files changed
+323
-238
No files matched your search
@@ -1,7 +1,8 @@
|
||||
---
|
||||
# git с явным safe.directory: клон может принадлежать другому пользователю.
|
||||
git_cmd: "git -c safe.directory={{ repo_dir }} -C {{ repo_dir }}"
|
||||
# validator_id в control-api: из inventory, иначе имя хоста.
|
||||
effective_validator_id: "{{ validator_id | default(inventory_hostname) }}"
|
||||
# Образ с меткой ревизии, собранный в этом прогоне.
|
||||
image_ref: "{{ image_name }}:{{ deploy_rev | default('unknown') }}"
|
||||
# digest образа: из -e image_digest=..., иначе найденный в preflight (хранится
|
||||
# в фактах localhost, чтобы все волны получили один и тот же).
|
||||
resolved_digest: "{{ image_digest | default(hostvars['localhost'].image_digest) }}"
|
||||
# Образ по digest: неизменяем, даже если тег поменяется посреди прогона.
|
||||
image_pull_ref: "{{ registry }}/{{ image_repo }}@{{ resolved_digest }}"
|
||||
Reference in new issue
Block a user