forked from jasonroyle/ansible-role-rabbitmq
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
--- | ||
- name: stop rabbitmq app | ||
shell: rabbitmqctl stop_app | ||
command: rabbitmqctl stop_app | ||
|
||
- name: reset rabbitmq on non-master node | ||
shell: rabbitmqctl reset | ||
command: rabbitmqctl reset | ||
|
||
- name: join rabbitmq cluster | ||
shell: "rabbitmqctl join_cluster {{ rabbitmq_cluster_master }}" | ||
command: "rabbitmqctl join_cluster {{ rabbitmq_cluster_master }}" | ||
register: rabbitmq_output | ||
ignore_errors: true | ||
|
||
- name: ensure rabbitmq cluster member | ||
fail: msg="Unable to join the cluster." | ||
fail: | ||
msg: "Unable to join the cluster." | ||
when: ("'already_member' not in rabbitmq_output.stderr") and rabbitmq_output.rc != 0 | ||
|
||
- name: start rabbitmq app | ||
shell: rabbitmqctl start_app | ||
command: rabbitmqctl start_app | ||
|
||
- name: Configure HA policy | ||
shell: rabbitmqctl set_policy ha-all "." '{"ha-mode":"all"}' | ||
command: rabbitmqctl set_policy ha-all "." '{"ha-mode":"all"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters