Commit e01f7b68 by e0d

refactoring

parent bface3c1
#Variables for rabbitmq
---
rabbit_app_dir: "{{ COMMON_APP_DIR }}/rabbitmq"
rabbit_data_dir: "{{ COMMON_DATA_DIR }}/rabbitmq"
rabbit_log_dir: "{{ COMMON_LOG_DIR }}/rabbitmq"
rabbit_cfg_dir: "{{ COMMON_CFG_DIR }}/rabbitmq"
# Environment specific vars
RABBIT_ERLANG_COOKIE: 'DEFAULT_COOKIE'
RABBIT_USERS:
......@@ -42,11 +47,6 @@ rabbitmq_auth_config:
erlang_cookie: $RABBIT_ERLANG_COOKIE
admins: $RABBIT_USERS
# If the system is running out of an Amazon Web Services
# cloudformation stack, this group name can used to pull out
# the name of the stack the rabbit server resides in.
rabbitmq_aws_stack_name: "tag_aws_cloudformation_stack-name_"
rabbitmq_clustered_hosts: []
rabbitmq_plugins:
......
{# Get the list of hosts that are in the same stack as the current machine
and also a rabbitmq machine.
#}
{%- if RABBITMQ_CLUSTERED -%}
{%- set hosts= [] -%}
{%- set all_rabbit_hosts = [] -%}
{%- do all_rabbit_hosts.extend(groups.tag_role_rabbitmq) -%}
{%- do all_rabbit_hosts.extend(groups.tag_group_rabbitmq) -%}
{%- for name in group_names -%}
{%- if name.startswith(rabbitmq_aws_stack_name) -%}
{%- for host in all_rabbit_hosts -%}
{%- if host in groups[name] -%}
{% do hosts.append("rabbit@ip-" + host.replace('.','-')) %}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
[{rabbit,
[{cluster_nodes, {['{{ hosts|join("\',\'") }}'], disc}}]}].
{%- else -%}
{# If rabbitmq_clustered_hosts is set, use that instead assuming an aws stack.
Note: That these names should include the node name prefix. eg. 'rabbit@hostname'
#}
[{rabbit,
[{cluster_nodes, {['{{ rabbitmq_clustered_hosts|join("\',\'") }}'], disc}}]}].
{%- endif -%}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment