Created
May 30, 2017 13:25
-
-
Save kedare/c3cd382ba57277010671e1c065225b18 to your computer and use it in GitHub Desktop.
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
Make sure RabbitMQ is running on Docker: | |
dockerng.running: | |
- name: {{ pillar["application_environment"] }}-rabbitmq | |
- image: rabbitmq:management | |
- port_bindings: "5672:5672,15672:15672" | |
{% for vhost in pillar["rabbitmq"]["vhosts"] %} | |
Create the {{ vhost }} RabbitMQ VHost: | |
rabbitmq_vhost.present: | |
- name: vhost | |
{% endfor %} | |
{% for user in pillar["rabbitmq"]["users"] %} | |
Create the {{ user["name"] }} RabbitMQ user: | |
rabbitmq_user.present: | |
- name: {{ user["name"] }} | |
- password: {{ user["password"]}} | |
- tags: | |
- {{ pillar["application_environment"] }} | |
- perms: | |
{% for vhost in user["vhosts"] %} | |
- {{ vhost }}: | |
- ".*" | |
- ".*" | |
- ".*" | |
{% endfor %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment