Merge "Tells rabbitmq to listen on single ip"

This commit is contained in:
Jenkins 2015-07-28 15:16:04 +00:00 committed by Gerrit Code Review
commit 4d6eaa25fc
2 changed files with 19 additions and 3 deletions

View File

@ -1 +1,2 @@
RABBITMQ_NODENAME=rabbit
export ERL_EPMD_ADDRESS={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}

View File

@ -1,9 +1,24 @@
[
{kernel, [
{inet_dist_use_interface, {% raw %}{{% endraw %}{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] | regex_replace('\.', ',') }}}}
]},
{rabbit, [
{cluster_nodes, [{% for host in groups['database'] %}'rabbit@{{ hostvars[host]['ansible_hostname'] }}'{% if not loop.last %},{% endif %}{% endfor %}]},
{tcp_listeners, [
{"{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}", 5672}
]},
{default_user, <<"{{ rabbitmq_user }}">>},
{default_pass, <<"{{ rabbitmq_password }}">>}
{default_pass, <<"{{ rabbitmq_password }}">>},
{cluster_partition_handling, autoheal},
{cluster_nodes, [
{% for host in groups['database'] %}'rabbit@{{ hostvars[host]['ansible_hostname'] }}'{% if not loop.last %},{% endif %}{% endfor %}
]}
]},
{rabbitmq_management, [
{listener, [
{ip, "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"},
{port, 15672}
]}
]}
].
% EOF