diff --git a/ansible/roles/rabbitmq/templates/rabbitmq-clusterer.config.j2 b/ansible/roles/rabbitmq/templates/rabbitmq-clusterer.config.j2 index a50ce84eae..34bf9b0dd7 100644 --- a/ansible/roles/rabbitmq/templates/rabbitmq-clusterer.config.j2 +++ b/ansible/roles/rabbitmq/templates/rabbitmq-clusterer.config.j2 @@ -1,9 +1,11 @@ [ {version, 1}, {nodes, [ -{% for host in groups['rabbitmq'] %} {'rabbit@{{ hostvars[host]['ansible_hostname'] }}', disc}{% if not loop.last %},{% endif %} - -{% endfor %} + {% 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'] }}'}} ].