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 <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-08-10 12:02:10 -05:00
parent 8adfab58c0
commit 35b4ae0019
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F

View File

@ -24,6 +24,7 @@
- name: Enable queue mirroring - name: Enable queue mirroring
rabbitmq_policy: rabbitmq_policy:
node: "rabbit@{{ ansible_hostname }}"
name: "HA" name: "HA"
pattern: '^(?!amq\.).*' pattern: '^(?!amq\.).*'
tags: "ha-mode=all" tags: "ha-mode=all"
@ -54,6 +55,7 @@
# that the "guest" user is eradicated. # that the "guest" user is eradicated.
- name: Ensure default rabbitmq guest user is removed - name: Ensure default rabbitmq guest user is removed
rabbitmq_user: rabbitmq_user:
node: "rabbit@{{ ansible_hostname }}"
user: guest user: guest
state: absent state: absent
when: inventory_hostname == groups[rabbitmq_host_group][0] when: inventory_hostname == groups[rabbitmq_host_group][0]
@ -62,6 +64,7 @@
- name: Ensure default rabbitmq guest user is removed - name: Ensure default rabbitmq guest user is removed
rabbitmq_user: rabbitmq_user:
node: "rabbit@{{ ansible_hostname }}"
user: guest user: guest
state: absent state: absent
when: inventory_hostname != groups[rabbitmq_host_group][0] when: inventory_hostname != groups[rabbitmq_host_group][0]