-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tells rabbitmq to listen on single ip
This binds rabbitmq, epmd, and the management plugin to a single ip. The syntax is very tricky, but this is all functional. Change-Id: Iecbb00f6c4fe3044688ae3258da31b9aabbd1501 Closes-Bug: #1478073
- Loading branch information
Showing
2 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
RABBITMQ_NODENAME=rabbit | ||
export ERL_EPMD_ADDRESS={{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|