Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
0d284539
Commit
0d284539
authored
Jun 28, 2013
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for alternate cluster hosts.
parent
4ada894c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
playbooks/roles/rabbitmq/templates/rabbitmq.config.j2
+12
-1
playbooks/roles/rabbitmq/vars/main.yml
+7
-0
No files found.
playbooks/roles/rabbitmq/templates/rabbitmq.config.j2
View file @
0d284539
{# Get the list of hosts that are in the same stack as the current machine
and also a rabbitmq machine.
#}
{%- if rabbitmq_clustered_hosts|length == 0 -%}
{%- set hosts= [] -%}
{%- for name in group_names -%}
{%- if name.startswith(
"tag_aws_cloudformation_stack-name_"
) -%}
{%- if name.startswith(
rabbitmq_aws_stack_name
) -%}
{%- for host in groups.tag_group_rabbitmq -%}
{%- if host in groups[name] -%}
{% do hosts.append("rabbit@ip-" + host.replace('.','-')) %}
...
...
@@ -14,3 +16,12 @@
[{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 -%}
playbooks/roles/rabbitmq/vars/main.yml
View file @
0d284539
...
...
@@ -14,3 +14,10 @@ rabbitmq_port: 5672
rabbitmq_auth_config
:
erlang_cookie
:
"
CHANGE
ME"
# 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
:
[]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment