Skip to content

Commit 8e7a983

Browse files
committed
Make Rabbit reset playbook hosts configurable
1 parent 3e5b44c commit 8e7a983

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

etc/kayobe/ansible/fixes/rabbitmq-reset.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Also restarts all OpenStack services using RabbitMQ.
44

55
- name: Stop OpenStack services
6-
hosts: controllers:compute:storage
6+
hosts: "{{ rabbitmq_reset_service_hosts | default('controllers:compute:storage') }}"
77
become: true
88
gather_facts: false
99
tasks:
@@ -18,7 +18,7 @@
1818
executable: "/bin/bash"
1919

2020
- name: Reset RabbitMQ
21-
hosts: controllers
21+
hosts: "{{ rabbitmq_reset_hosts | default('controllers') }}"
2222
become: true
2323
gather_facts: false
2424
vars:
@@ -69,10 +69,10 @@
6969
ansible.builtin.command: docker exec {{ container_name }} /bin/bash -c 'rabbitmqctl start_app'
7070

7171
- name: Wait for all nodes to join the cluster
72-
ansible.builtin.command: docker exec {{ container_name }} /bin/bash -c 'rabbitmqctl await_online_nodes {{ groups['controllers'] | length }}'
72+
ansible.builtin.command: docker exec {{ container_name }} /bin/bash -c 'rabbitmqctl await_online_nodes {{ ansible_play_hosts | length }}'
7373

7474
- name: Restart OpenStack services
75-
hosts: controllers:compute:storage
75+
hosts: "{{ rabbitmq_reset_service_hosts | default('controllers:compute:storage') }}"
7676
become: true
7777
gather_facts: false
7878
tasks:

0 commit comments

Comments
 (0)