Add Ansible playbook to deliver validator-agent to the validators
Run from the jump host: on each validator it updates the git clone in /opt/cloud-ip-validator, builds the image there, stops and removes the current container and starts a new one from the new image. Run parameters live in an env file (deploy/ansible/env/validator-agent.env, git-ignored, template committed). The image is built before the running container is touched, so a failed build leaves the old container running. Hosts are updated in waves (1, 4, rest) and any failure stops the run. validator_id comes from the inventory and is checked against the running container before it is replaced. Only ansible.builtin modules are used, so the validators need no extra packages. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
abbee9a08a
commit
49890ff5de
16 files changed
+684
-1
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# Запускать из каталога deploy/ansible (там же лежит этот файл).
|
||||
[defaults]
|
||||
inventory = inventory/hosts.yml
|
||||
roles_path = roles
|
||||
forks = 20
|
||||
retry_files_enabled = False
|
||||
interpreter_python = auto_silent
|
||||
callback_result_format = yaml
|
||||
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
# accept-new: отпечаток нового хоста запоминается при первом подключении (без
|
||||
# интерактивного вопроса); изменившийся отпечаток известного хоста по-прежнему
|
||||
# приводит к ошибке.
|
||||
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=accept-new
|
||||
Reference in new issue
Block a user