Jan Dittberner
a3dd83f4da
This commit takes care of making rabbitmq and redis work on a messaging server. The configuration of gvaldap and gvaweb has been adapted to make both applications work with actual running rabbitmq and redis.
38 lines
1.2 KiB
Text
38 lines
1.2 KiB
Text
include:
|
|
- rabbitmq-server
|
|
|
|
gnuviechadmin-queue-vhost:
|
|
rabbitmq_vhost.present:
|
|
- name: {{ salt['pillar.get']('gnuviechadmin:queues:vhost') }}
|
|
|
|
gnuviechadmin_test-queue-vhost:
|
|
rabbitmq_vhost.present:
|
|
- name: {{ "%s_test" % salt['pillar.get']('gnuviechadmin:queues:vhost') }}
|
|
|
|
{% for user in salt['pillar.get']('gnuviechadmin:queues:users') %}
|
|
gnuviechadmin-queue-user-{{ user }}:
|
|
rabbitmq_user.present:
|
|
- name: {{ user }}
|
|
- password: {{ salt['pillar.get']('gnuviechadmin:queues:users:%s:password' % user) }}
|
|
{% if salt['pillar.get']('gnuviechadmin:queues:users:%s:perms' % user) %}
|
|
- perms:
|
|
{% for vhost, perms in salt['pillar.get']('gnuviechadmin:queues:users:%s:perms' % user).items() %}
|
|
- {{ vhost }}:
|
|
- {{ perms[0] }}
|
|
- {{ perms[1] }}
|
|
- {{ perms[2] }}
|
|
- {{ vhost + "_test" }}:
|
|
- {{ perms[0] }}
|
|
- {{ perms[1] }}
|
|
- {{ perms[2] }}
|
|
{% endfor %}
|
|
{% 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 %}
|
|
{% endif %}
|
|
- require:
|
|
- rabbitmq_vhost: {{ salt['pillar.get']('gnuviechadmin:queues:vhost') }}
|
|
{% endfor %}
|