]> git.immae.eu Git - github/fretlink/ansible-rabbitmq.git/blob - tasks/debian.yml
Rebased from master after PR's and cleaned up
[github/fretlink/ansible-rabbitmq.git] / tasks / debian.yml
1 ---
2 - name: debian | Adding Pre-Reqs
3 apt:
4 name: ['gnupg2']
5 state: present
6 become: true
7 register: result
8 until: result is successful
9
10 - name: debian | adding RabbitMQ public GPG key to the apt repo
11 apt_key:
12 url: "{{ rabbitmq_debian_repo_key }}"
13 state: present
14 become: true
15 register: result
16 until: result is successful
17
18 - name: debian | adding RabbitMQ repo
19 apt_repository:
20 repo: "{{ rabbitmq_debian_repo }}"
21 state: present
22 become: true
23 register: result
24 until: result is successful
25
26 - name: debian | add Rabbitmq erlang repo key
27 apt_key:
28 url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang
29 state: present
30 become: true
31 register: result
32 until: result is successful
33 when: rabbitmq_debian_erlang_from_rabbit
34
35 - name: debian | add Rabbitmq erlang repo
36 apt_repository:
37 repo: deb https://dl.bintray.com/rabbitmq-erlang/debian {{ ansible_distribution_release }} erlang
38 state: present
39 become: true
40 when: rabbitmq_debian_erlang_from_rabbit
41
42 - name: debian | installing RabbitMQ server
43 apt:
44 name: ['rabbitmq-server']
45 state: present
46 become: true
47 register: result
48 until: result is successful
49 with_items:
50 - rabbitmq-server{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'') }}
51
52 - name: debian | enabling the RabbitMQ Management Console
53 rabbitmq_plugin:
54 names: rabbitmq_management
55 state: enabled
56 become: true
57 notify: restart rabbitmq-server
58
59 - name: debian | ensuring that the RabbitMQ service is running
60 service:
61 name: rabbitmq-server
62 state: started
63 enabled: yes
64 become: true