chore: ansible ioc/service master restart
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
# TODO: Create venv and install ansible? That way not dependent on ansible
|
||||
# being installed on machine.
|
||||
|
||||
- name: Install and Restart Master IOC
|
||||
import_playbook: ../plays/ioc/ioc-install-and-restart-master.yml
|
||||
- name: Install Master IOC
|
||||
vars:
|
||||
service_dir_name: 000-master
|
||||
import_playbook: ../plays/ioc/ioc-install.yml
|
||||
|
||||
- name: Restart Master IOC
|
||||
vars:
|
||||
service_dir_name: 000-master
|
||||
import_playbook: ../plays/ioc/ioc-restart.yml
|
||||
|
||||
- name: Deploy and Restart Master Service
|
||||
import_playbook: ../plays/service/service-deploy-and-restart-master.yml
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
- name: Install and Restart Master IOC
|
||||
vars:
|
||||
service_dir_name: 000-master
|
||||
import_playbook: ioc-install-and-restart.yml
|
||||
@@ -70,10 +70,4 @@
|
||||
failed_when: >
|
||||
ioc_install_result.rc != 0 or
|
||||
"[error]" in ioc_install_result.stderr or
|
||||
"Unable to write" in ioc_install_result.stderr
|
||||
|
||||
- name: "[{{ service_dir_name }}] Restart IOC"
|
||||
ansible.builtin.shell:
|
||||
cmd: "ioc restart AGEBD-CPCL-{{ service_name_upper }}{{ env_suffix_upper }}"
|
||||
chdir: "{{ ioc_base_dir }}"
|
||||
changed_when: true
|
||||
"Unable to write" in ioc_install_result.stderr
|
||||
@@ -0,0 +1,23 @@
|
||||
- name: Restart an IOC
|
||||
# TODO: dev/prod
|
||||
hosts: sls-lc
|
||||
gather_facts: false
|
||||
|
||||
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
|
||||
version: "feature/add-service-{{ service_dir_name }}"
|
||||
force: true
|
||||
|
||||
- name: "[{{ service_dir_name }}] Restart IOC"
|
||||
ansible.builtin.shell:
|
||||
cmd: "ioc restart AGEBD-CPCL-{{ service_name_upper }}{{ env_suffix_upper }}"
|
||||
chdir: "{{ ioc_base_dir }}"
|
||||
changed_when: true
|
||||
Reference in New Issue
Block a user