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:
parent
c76ce3fecf
commit
0679db0690
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user