aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.coml>2016-03-03 15:28:30 -0500
committerLarry Smith Jr <mrlesmithjr@gmail.coml>2016-03-03 15:28:30 -0500
commit203ffcbfc31abb06c306d3adbde7e44dce9afca2 (patch)
tree752378316844898114f23c499bad0a2ae6f28cfc /tasks
parent93a297c59940c7cfe88afe0f9110af5b4be521e3 (diff)
downloadansible-rabbitmq-203ffcbfc31abb06c306d3adbde7e44dce9afca2.tar.gz
ansible-rabbitmq-203ffcbfc31abb06c306d3adbde7e44dce9afca2.tar.zst
ansible-rabbitmq-203ffcbfc31abb06c306d3adbde7e44dce9afca2.zip
Added support for CentOS and Vagrant
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.coml>
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