From 1b39e9b9274a8250ea135051f92cd58b9939647c Mon Sep 17 00:00:00 2001 From: Trent Nadeau Date: Wed, 3 Jul 2019 15:28:49 -0400 Subject: [PATCH] Fix ansible-lint warnings --- handlers/main.yml | 2 +- tasks/cluster.yml | 13 +++++++------ tasks/install-RedHat.yml | 12 ++++++------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index fa9e4e6..fa6be5a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -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 diff --git a/tasks/cluster.yml b/tasks/cluster.yml index 7a82af1..ef50e8c 100644 --- a/tasks/cluster.yml +++ b/tasks/cluster.yml @@ -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"}' diff --git a/tasks/install-RedHat.yml b/tasks/install-RedHat.yml index 6059723..003e164 100644 --- a/tasks/install-RedHat.yml +++ b/tasks/install-RedHat.yml @@ -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 }}