aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/redhat.yml
blob: 1624d8f148b604fb0e60bb0b4fedb9ffe6389cbf (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
42
43
44
45
46
47
48
49
50
---
- name: redhat | installing pre-reqs (yum)
  yum:
    name: "{{ item }}"
    state: present
  with_items:
    - dnf
    - epel-release
    - python-dnf
  when: >
        ansible_distribution != "Fedora"

- name: redhat | installing pre-reqs (dnf)
  dnf:
    name: "{{ item }}"
    state: present
  with_items:
    - wget

- name: redhat | installing erlang
  dnf:
    name: "erlang"
    state: present

- name: redhat | adding RabbitMQ public GPG key
  rpm_key:
    key: "{{ rabbitmq_redhat_repo_key }}"
    state: present

- name: redhat | downloading RabbitMQ
  get_url:
    url: "{{ rabbitmq_redhat_url }}/{{ rabbitmq_redhat_package }}"
    dest: "/opt/{{ rabbitmq_redhat_package }}"

- name: redhat | installing RabbitMQ
  dnf:
    name: "/opt/{{ rabbitmq_redhat_package }}"
    state: present

- name: redhat | starting and enabling RabbitMQ service
  service:
    name: "rabbitmq-server"
    state: started
    enabled: yes

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