Fix server/hostname for RFC 1034/1035

This change ensures that the RabbitMQ ServerName is being set to
the **ansible_hostname** fact. This ensures the RabbitMQ server
has an appropriate server name which is compliant to the RFC.

Change-Id: I1f6a161b3af8fd0edd677ac1c3f396e6e8b5d02e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-04-17 01:46:00 -05:00
parent c76ce3fecf
commit 0679db0690
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
4 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@
## APT Cache Options
cache_timeout: 600
rabbitmq_primary_cluster_node: "{{ groups['rabbitmq_all'][0] }}"
rabbitmq_primary_cluster_node: "{{ hostvars[groups['rabbitmq_all'][0]]['ansible_hostname'] }}"
# Upgrading the RabbitMQ package requires shutting down the cluster. This variable makes upgrading
# the version an explicit action.

View File

@ -15,8 +15,8 @@
- include: rabbitmq_cluster_create.yml
when: >
inventory_hostname == rabbitmq_primary_cluster_node
ansible_hostname == rabbitmq_primary_cluster_node
- include: rabbitmq_cluster_join.yml
when: >
inventory_hostname != rabbitmq_primary_cluster_node
ansible_hostname != rabbitmq_primary_cluster_node

View File

@ -19,7 +19,7 @@
state: started
failed_when: false
when: >
inventory_hostname == rabbitmq_primary_cluster_node
ansible_hostname == rabbitmq_primary_cluster_node
tags:
- rabbitmq-server-started
- rabbitmq-upgrade
@ -31,7 +31,7 @@
state: started
failed_when: false
when: >
inventory_hostname != rabbitmq_primary_cluster_node
ansible_hostname != rabbitmq_primary_cluster_node
tags:
- rabbitmq-server-started
- rabbitmq-upgrade

View File

@ -19,7 +19,7 @@
state: stopped
failed_when: false
when: >
inventory_hostname != rabbitmq_primary_cluster_node
ansible_hostname != rabbitmq_primary_cluster_node
tags:
- rabbitmq-server-stopped
- rabbitmq-upgrade
@ -31,7 +31,7 @@
state: stopped
failed_when: false
when: >
inventory_hostname == rabbitmq_primary_cluster_node
ansible_hostname == rabbitmq_primary_cluster_node
tags:
- rabbitmq-server-stopped
- rabbitmq-upgrade