
Wait for the cloud-init script to have completed before trying to start mysql. Also handle rabbitmq service shutdown and startup by removing nodes from the cluster before shutting down. Change-Id: Ie8ab6282c58e989d24e0e560da346fb05835604b
13 lines
560 B
YAML
13 lines
560 B
YAML
# Additional Steps for controller nodes only to rejoin the cluster
|
|
- name: Get the bootstrap hostname
|
|
set_fact:
|
|
bootstrap_hostname={{ hostvars[groups['controller-bootstrap'][0]]['ansible_hostname'] }}
|
|
- name: Stop the RabbitMQ application to enable rejoining the cluster
|
|
command: rabbitmqctl stop_app
|
|
sudo: yes
|
|
- name: Re-join the RabbitMQ cluster
|
|
command: rabbitmqctl join_cluster "rabbit@{{ bootstrap_hostname }}"
|
|
failed_when: bootstrap_hostname is not defined
|
|
- name: Start the RabbitMQ application
|
|
command: rabbitmqctl start_app
|
|
sudo: yes |