From 35b4ae001936b54febeb3b02f2a685a33201b0c9 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 10 Aug 2016 12:02:10 -0500 Subject: [PATCH] Update the rabbitmq modules to use the node name This change adds the rabbitmq node name to the rabbitmq libs. This is needed to ensure the rabbitmq cli commands are connecting to an explicite cluster name without any assumptions. Change-Id: I32de32c3972563ca2351be12f221fd2f11de20d0 Signed-off-by: Kevin Carter --- tasks/rabbitmq_post_install.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/rabbitmq_post_install.yml b/tasks/rabbitmq_post_install.yml index c7f574a1..fde80a54 100644 --- a/tasks/rabbitmq_post_install.yml +++ b/tasks/rabbitmq_post_install.yml @@ -24,6 +24,7 @@ - name: Enable queue mirroring rabbitmq_policy: + node: "rabbit@{{ ansible_hostname }}" name: "HA" pattern: '^(?!amq\.).*' tags: "ha-mode=all" @@ -54,6 +55,7 @@ # that the "guest" user is eradicated. - name: Ensure default rabbitmq guest user is removed rabbitmq_user: + node: "rabbit@{{ ansible_hostname }}" user: guest state: absent when: inventory_hostname == groups[rabbitmq_host_group][0] @@ -62,6 +64,7 @@ - name: Ensure default rabbitmq guest user is removed rabbitmq_user: + node: "rabbit@{{ ansible_hostname }}" user: guest state: absent when: inventory_hostname != groups[rabbitmq_host_group][0]