Skip to content

Instantly share code, notes, and snippets.

@kedare kedare/rabbitmq.sls
Created May 30, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.