aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/debian.yml
blob: b25d39b09cc393933332b32fc010768a40921b8f (plain) (blame)
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
33
34
35
36
37
38
39
40
41
---
- name: debian | adding RabbitMQ public GPG key to the apt repo
  apt_key:
    url: "{{ rabbitmq_debian_repo_key }}"
    state: present
  become: true

- name: debian | adding RabbitMQ repo
  apt_repository:
    repo: "{{ rabbitmq_debian_repo }}"
    state: present
  register: "rabbitmq_repo_added"
  become: true

- name: debian | updating apt cache
  apt:
    update_cache: yes
  become: true
  when: rabbitmq_repo_added.changed

- name: debian | installing RabbitMQ server
  apt:
    name: "{{ item }}"
    state: present
  become: true
  with_items:
    - rabbitmq-server

- name: debian | enabling the RabbitMQ Management Console
  rabbitmq_plugin:
    names: rabbitmq_management
    state: enabled
  become: true
  notify: restart rabbitmq-server

- name: debian | ensuring that the RabbitMQ service is running
  service:
    name: rabbitmq-server
    state: started
    enabled: yes
  become: true