2015-10-04 20:18:44 +02:00
|
|
|
include:
|
|
|
|
- rabbitmq-server
|
|
|
|
|
2016-01-29 18:34:40 +01:00
|
|
|
gnuviechadmin-queue-vhost:
|
2015-10-04 20:18:44 +02:00
|
|
|
rabbitmq_vhost.present:
|
2016-01-29 18:34:40 +01:00
|
|
|
- name: {{ salt['pillar.get']('gnuviechadmin:queues:vhost') }}
|
2015-10-04 20:18:44 +02:00
|
|
|
|
2016-01-31 11:42:45 +01:00
|
|
|
gnuviechadmin_test-queue-vhost:
|
|
|
|
rabbitmq_vhost.present:
|
|
|
|
- name: {{ "%s_test" % salt['pillar.get']('gnuviechadmin:queues:vhost') }}
|
|
|
|
|
2016-01-29 18:34:40 +01:00
|
|
|
{% for user in salt['pillar.get']('gnuviechadmin:queues:users') %}
|
2015-10-04 20:18:44 +02:00
|
|
|
gnuviechadmin-queue-user-{{ user }}:
|
|
|
|
rabbitmq_user.present:
|
|
|
|
- name: {{ user }}
|
2016-01-29 18:34:40 +01:00
|
|
|
- password: {{ salt['pillar.get']('gnuviechadmin:queues:users:%s:password' % user) }}
|
|
|
|
{% if salt['pillar.get']('gnuviechadmin:queues:users:%s:perms' % user) %}
|
2015-10-04 20:18:44 +02:00
|
|
|
- perms:
|
2020-03-04 15:02:58 +01:00
|
|
|
{% for vhost, perms in salt['pillar.get']('gnuviechadmin:queues:users:%s:perms' % user).items() %}
|
2015-10-04 20:18:44 +02:00
|
|
|
- {{ vhost }}:
|
|
|
|
- {{ perms[0] }}
|
|
|
|
- {{ perms[1] }}
|
|
|
|
- {{ perms[2] }}
|
2016-01-31 11:42:45 +01:00
|
|
|
- {{ vhost + "_test" }}:
|
|
|
|
- {{ perms[0] }}
|
|
|
|
- {{ perms[1] }}
|
|
|
|
- {{ perms[2] }}
|
2015-10-04 20:18:44 +02:00
|
|
|
{% endfor %}
|
2016-01-29 18:34:40 +01:00
|
|
|
{% endif %}
|
|
|
|
{% if salt['pillar.get']('gnuviechadmin:queues:users:%s:tags' % user) %}
|
|
|
|
- tags:
|
|
|
|
{% for tag in salt['pillar.get']('gnuviechadmin:queues:users:%s:tags' % user) %}
|
|
|
|
- {{ tag }}
|
|
|
|
{% endfor %}
|
2015-10-04 20:18:44 +02:00
|
|
|
{% endif %}
|
|
|
|
- require:
|
2016-01-29 18:34:40 +01:00
|
|
|
- rabbitmq_vhost: {{ salt['pillar.get']('gnuviechadmin:queues:vhost') }}
|
2015-10-04 20:18:44 +02:00
|
|
|
{% endfor %}
|