aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tasks')
-rw-r--r--tasks/main.yml3
-rw-r--r--tasks/redhat.yml43
2 files changed, 46 insertions, 0 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
index bde00da..1768dd9 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -2,6 +2,9 @@
2- include: debian.yml 2- include: debian.yml
3 when: ansible_os_family == "Debian" 3 when: ansible_os_family == "Debian"
4 4
5- include: redhat.yml
6 when: ansible_os_family == "RedHat"
7
5- name: checking to see if already clustered 8- name: checking to see if already clustered
6 stat: path=/etc/rabbitmq/clustered 9 stat: path=/etc/rabbitmq/clustered
7 register: clustered 10 register: clustered
diff --git a/tasks/redhat.yml b/tasks/redhat.yml
new file mode 100644
index 0000000..bf6f1e1
--- /dev/null
+++ b/tasks/redhat.yml
@@ -0,0 +1,43 @@
1---
2- name: redhat | installing pre-reqs
3 yum:
4 name: "{{ item }}"
5 state: present
6 with_items:
7 - dnf
8 - epel-release
9 - python-dnf
10 when: >
11 ansible_distribution != "Fedora"
12
13- name: redhat | installing erlang
14 dnf:
15 name: "erlang"
16 state: present
17
18- name: redhat | adding RabbitMQ public GPG key
19 rpm_key:
20 key: "{{ rabbitmq_redhat_repo_key }}"
21 state: present
22
23- name: redhat | downloading RabbitMQ
24 get_url:
25 url: "{{ rabbitmq_redhat_url }}/{{ rabbitmq_redhat_package }}"
26 dest: "/opt/{{ rabbitmq_redhat_package }}"
27
28- name: redhat | installing RabbitMQ
29 dnf:
30 name: "/opt/{{ rabbitmq_redhat_package }}"
31 state: present
32
33- name: redhat | starting and enabling RabbitMQ service
34 service:
35 name: "rabbitmq-server"
36 state: started
37 enabled: yes
38
39- name: redhat | enabling the RabbitMQ Management Console
40 rabbitmq_plugin:
41 names: rabbitmq_management
42 state: enabled
43 notify: restart rabbitmq-server