enable rabbitmq management and add admin permissions

- allow database creation for gnuviechadmin user in local deployments to
  allow test runs
- set administrator tag for gnuviechadmin user in rabbitmq
- add all permissions on gnuviechadmin vhost to gnuviechadmin user
- enable rabbitmq management plugin
This commit is contained in:
Jan Dittberner 2015-10-11 15:28:23 +02:00
parent 6c9caec8d6
commit fedd0b95f2
3 changed files with 16 additions and 0 deletions

View file

@ -7,6 +7,9 @@ gnuviechadmin-database:
- user: postgres
- password: {{ salt['pillar.get']('gnuviechadmin-database:owner:password') }}
- login: True
- createdb: {% if salt['pillar.get']('gnuviechadmin:deploymenttype', 'production') == 'local' %}True
{%- else %}False
{%- endif %}
- require:
- service: postgresql
postgres_database.present:

View file

@ -5,6 +5,13 @@ gnuviechadmin-queues:
rabbitmq_user.present:
- name: {{ salt['pillar.get']('gnuviechadmin-queues:owner:user') }}
- password: {{ salt['pillar.get']('gnuviechadmin-queues:owner:password') }}
- tags:
- administrator
- perms:
- {{ salt['pillar.get']('gnuviechadmin-queues:vhost') }}:
- '.*'
- '.*'
- '.*'
rabbitmq_vhost.present:
- name: {{ salt['pillar.get']('gnuviechadmin-queues:vhost') }}
- owner: {{ salt['pillar.get']('gnuviechadmin-queues:owner:user') }}

View file

@ -9,3 +9,9 @@ rabbitmq-server:
guest:
rabbitmq_user:
- absent
rabbitmq_management:
rabbitmq_plugin:
- enabled
- watch_in:
- service: rabbitmq-server