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 3270b43578
commit 68170f7576
3 changed files with 16 additions and 0 deletions

View file

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

View file

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

View file

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