From 04992a3de0a181a658cae2561a3a1adce313bbf1 Mon Sep 17 00:00:00 2001 From: weiyu Date: Tue, 2 Feb 2016 18:37:44 +0800 Subject: [PATCH] fix miss rabbitmq config when hostname include special character Change-Id: I46db4d3547b120d1ccd87a48e31b699bdd1aa1a0 Closes-Bug: #1540234 --- ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 b/ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 index fe199394a0..a50ce84eae 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq_clusterer.config.j2 @@ -1,9 +1,9 @@ [ {version, 1}, {nodes, [ -{% for host in groups['rabbitmq'] %} {rabbit@{{ hostvars[host]['ansible_hostname'] }}, disc}{% if not loop.last %},{% endif %} +{% for host in groups['rabbitmq'] %} {'rabbit@{{ hostvars[host]['ansible_hostname'] }}', disc}{% if not loop.last %},{% endif %} {% endfor %} ]}, - {gospel, {node, rabbit@{{ hostvars[groups['rabbitmq'][0]]['ansible_hostname'] }}}} + {gospel, {node, 'rabbit@{{ hostvars[groups['rabbitmq'][0]]['ansible_hostname'] }}'}} ].