Skip to content

Commit

Permalink
Fix ansible-lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tanadeau committed Jul 3, 2019
1 parent 8e4a16e commit 1b39e9b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
state: restarted

- name: remove non-master-node on master
shell: "rabbitmqctl forget_cluster_node rabbit@{{ inventory_hostname_short }}"
command: "rabbitmqctl forget_cluster_node rabbit@{{ inventory_hostname_short }}"
delegate_to: "{{ rabbitmq_cluster_master_node }}"
ignore_errors: yes
13 changes: 7 additions & 6 deletions tasks/cluster.yml
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"}'
12 changes: 6 additions & 6 deletions tasks/install-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
yum_repository:
name: rabbitmq-erlang
description: Erlang
baseurl: '{{ erlang_yum_baseurl }}'
gpgcheck: '{{ erlang_yum_gpgcheck }}'
gpgkey: '{{ erlang_yum_repo_gpgkey }}'
baseurl: '{{ erlang_yum_baseurl }}'
gpgcheck: '{{ erlang_yum_gpgcheck }}'
gpgkey: '{{ erlang_yum_repo_gpgkey }}'
repo_gpgcheck: '{{ erlang_yum_repo_gpgcheck }}'
- name: Configure RabbitMQ Yum repo
yum_repository:
name: rabbitmq
description: RabbitMQ
baseurl: '{{ rabbitmq_yum_baseurl }}'
baseurl: '{{ rabbitmq_yum_baseurl }}'
gpgcheck: '{{ rabbitmq_yum_gpgcheck }}'
repo_gpgcheck: '{{ rabbitmq_yum_repo_gpgcheck }}'
gpgkey: '{{ rabbitmq_yum_repo_gpgcheck }}'
repo_gpgcheck: '{{ rabbitmq_yum_repo_gpgcheck }}'
gpgkey: '{{ rabbitmq_yum_repo_gpgcheck }}'
- name: Install RabbitMQ
package:
name: rabbitmq-server-{{ rabbitmq_version }}
Expand Down

0 comments on commit 1b39e9b

Please sign in to comment.