aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--defaults/main.yml4
-rw-r--r--meta/main.yml2
-rw-r--r--tasks/debian.yml22
-rw-r--r--tasks/main.yml24
5 files changed, 28 insertions, 26 deletions
diff --git a/README.md b/README.md
index bc57b4c..14f946c 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
1Role Name 1Role Name
2========= 2=========
3 3
4Installs rabbitmq https://www.rabbitmq.com/ 4Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
5 5
6Requirements 6Requirements
7------------ 7------------
diff --git a/defaults/main.yml b/defaults/main.yml
index 8ca8a4f..c1cd0d8 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -1,4 +1,4 @@
1--- 1---
2# defaults file for ansible-rabbitmq 2# defaults file for ansible-rabbitmq
3enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster 3enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group
4config_rabbitmq_ha: false #defines if rabbitmq ha should be configured 4config_rabbitmq_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group
diff --git a/meta/main.yml b/meta/main.yml
index 67993d0..4bd090d 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -1,7 +1,7 @@
1--- 1---
2galaxy_info: 2galaxy_info:
3 author: Larry Smith Jr. 3 author: Larry Smith Jr.
4 description: Installs rabbitmq (can be HA and clustered) 4 description: Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
5 #company: your company (optional) 5 #company: your company (optional)
6 # Some suggested licenses: 6 # Some suggested licenses:
7 # - BSD (default) 7 # - BSD (default)
diff --git a/tasks/debian.yml b/tasks/debian.yml
new file mode 100644
index 0000000..563563a
--- /dev/null
+++ b/tasks/debian.yml
@@ -0,0 +1,22 @@
1---
2- name: Add the RabbitMQ public GPG key to the apt repo
3 apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc state=present
4
5- name: Add RabbitMQ to the sources list
6 apt_repository: repo='deb http://www.rabbitmq.com/debian/ testing main' update_cache=no state=present
7
8- name: Install RabbitMQ server
9 apt: name={{ item }} update_cache=no force=yes state=installed
10 with_items:
11 - rabbitmq-server
12
13- name: Enable the RabbitMQ Management Console
14 rabbitmq_plugin: names=rabbitmq_management state=enabled
15 notify: restart rabbitmq-server
16
17- name: Ensure that the RabbitMQ service is running
18 service: name=rabbitmq-server state=started enabled=yes
19
20- name: check | checking to see if already clustered
21 stat: path=/etc/rabbitmq/clustered
22 register: clustered
diff --git a/tasks/main.yml b/tasks/main.yml
index e74c1e5..3752d78 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,26 +1,6 @@
1---
2# tasks file for ansible-rabbitmq 1# tasks file for ansible-rabbitmq
3- name: Add the RabbitMQ public GPG key to the apt repo 2- include: debian.yml
4 apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc state=present 3 when: ansible_os_family == "Debian"
5
6- name: Add RabbitMQ to the sources list
7 apt_repository: repo='deb http://www.rabbitmq.com/debian/ testing main' update_cache=no state=present
8
9- name: Install RabbitMQ server
10 apt: name={{ item }} update_cache=no force=yes state=installed
11 with_items:
12 - rabbitmq-server
13
14- name: Enable the RabbitMQ Management Console
15 rabbitmq_plugin: names=rabbitmq_management state=enabled
16 notify: restart rabbitmq-server
17
18- name: Ensure that the RabbitMQ service is running
19 service: name=rabbitmq-server state=started enabled=yes
20
21- name: check | checking to see if already clustered
22 stat: path=/etc/rabbitmq/clustered
23 register: clustered
24 4
25- include: rabbitmq_clustering.yml 5- include: rabbitmq_clustering.yml
26 when: enable_rabbitmq_clustering and (clustered.stat.exists != True) 6 when: enable_rabbitmq_clustering and (clustered.stat.exists != True)