-
Notifications
You must be signed in to change notification settings - Fork 0
/
rmq_playbook.yaml
32 lines (28 loc) · 1.1 KB
/
rmq_playbook.yaml
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
30
31
32
---
- name: Configure Jenkins Playbook
hosts: tag_group_rmq
tasks:
- name: install RMQ
become: yes
shell: |
apt-get update -y
apt-get install curl gnupg -y
curl -fsSL https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc | apt-key add -
apt-get install apt-transport-https
tee /etc/apt/sources.list.d/bintray.rabbitmq.list <<EOF
deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang
deb https://dl.bintray.com/rabbitmq/debian bionic main
EOF
apt-get update -y
apt-get install rabbitmq-server -y --fix-missing
- name: Start RMQ
become: yes
shell: service rabbitmq-server start
- name: Enable admin gui
become: yes
shell: rabbitmq-plugins enable rabbitmq_management
- name: Add initial user
become: yes
shell: |
rabbitmqctl add_user sparlor welcome1
rabbitmqctl set_user_tags sparlor administrator