Created
May 30, 2017 13:25
Star
You must be signed in to star a gist
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