-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
29 lines (24 loc) · 919 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
- name: Add rabbitmq gpg key
apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc state=present
- name: Add rabbitmq repo
apt_repository: repo='deb http://www.rabbitmq.com/debian/ testing main' state=present
- name: Install rabbitmq
apt: name=rabbitmq-server state=present force=yes
- name: Configure rabbitmq
template: src=rabbitmq.config.j2 dest=/etc/rabbitmq/rabbitmq.config
notify:
- Restart rabbitmq
- name: Create rabbitmq users
rabbitmq_user: >
name={{ item.name }}
password={{ item.password|default(item.name) }}
vhost={{ item.vhost|default('/') }}
configure_priv={{ item.configure_priv|default('.*') }}
read_priv={{ item.read_priv|default('.*') }}
write_priv={{ item.write_priv|default('.*') }}
tags={{ item.tags|default('administrator') }}
state=present
with_items: '{{ rabbitmq.users|default([]) }}'
notify:
- Restart rabbitmq