feature: add ansible restart MASTER ioc
Deploy bin / deploy (push) Successful in 3s
Deploy service MASTER / deploy (push) Failing after 3s

This commit is contained in:
Benjamin Labrecque
2026-07-06 10:45:00 +02:00
parent 00fc0b2b99
commit 38d33afd29
+44
View File
@@ -0,0 +1,44 @@
- name: Restart Master IOC
# TODO: dev/prod
hosts: sls-lc
gather_facts: false
#TODO: docs?
# For the git clone and git push commands to work smoothly inside this playbook,
# ensure your shell environment is passing your SSH key. Run ssh-add -l on your
# terminal before firing up ansible-playbook.
# TODO
# If the machine executing this playbook doesn't have a global Git user configured,
# the git commit task will fail. You can explicitly bypass this by adding environment
# variables directly to the commit task if needed:
# environment:
# GIT_COMMITTER_NAME: "Ansible Provisioner"
# GIT_COMMITTER_EMAIL: "your-email@psi.ch"
# GIT_AUTHOR_NAME: "Ansible Provisioner"
# GIT_AUTHOR_EMAIL: "your-email@psi.ch"
vars:
- workspace_dir: "/tmp/hla_framework_bd"
tasks:
- name: Clone this repository
ansible.builtin.git:
repo: "git@gitea.psi.ch:sls/hla_framework_bd.git"
dest: "{{ workspace_dir }}"
version: main
accept_hostkey: true
- name: Reinstall MASTER IOC
ansible.builtin.shell:
# TODO: prod/dev
cmd: "ioc install -V --facility sls --ioc AGEBD-CPCL-MASTER-DEV --clean"
chdir: "{{ workspace_dir }}/services/000-master/ioc"
changed_when: true
- name: Restart MASTER IOC
ansible.builtin.shell:
# TODO: prod/dev
cmd: "ioc restart AGEBD-CPCL-MASTER-DEV"
chdir: "{{ workspace_dir }}/services/000-master/ioc"
changed_when: true