I am performing rolling updates in several cluster. Each cluster is a group in inventory.
I want to pause the playbook when a cluster is done (a group of hosts) and not after every host.
- hosts: 127.0.0.1
connection: local
gather_facts: no
tasks:
- name: prompt 1
pause:
prompt: prompt1
run_once: true
- name: prompt 1
pause:
prompt: prompt2
run_once: true
- hosts: "{{ target }}"
gather_facts: no
serial: 1
become: yes
become_method: sudo
ignore_unreachable: true
roles:
- app
I would like to pause the playbook after one host group before the next host group begin.
For eg, If I have the group called eu_app
, us_app
, then after deploying all hosts in group eu_app
, playbook has to wait for 15 minutes to deploy for next group us_app
.
I tried using loop_control
with group_names
but it is pausing the playbook even for child groups present for the parent group. Pause should happen only for parent group.