]> git.immae.eu Git - github/fretlink/ansible-rabbitmq.git/commitdiff
updated tasks based on Debian
authorLarry Smith Jr <larry.e.smith.jr@gmail.com>
Fri, 7 Aug 2015 00:25:37 +0000 (20:25 -0400)
committerLarry Smith Jr <larry.e.smith.jr@gmail.com>
Fri, 7 Aug 2015 00:25:37 +0000 (20:25 -0400)
README.md
defaults/main.yml
meta/main.yml
tasks/debian.yml [new file with mode: 0644]
tasks/main.yml

index bc57b4cb46981ce2391dc5ca9360aa73932514b3..14f946c9c31fde7ebb6c7751a5133747df273c4d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 Role Name
 =========
 
-Installs rabbitmq https://www.rabbitmq.com/
+Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
 
 Requirements
 ------------
index 8ca8a4f348a8e785f8e0e916f6216272dd3fece4..c1cd0d886c2b360f426e759ea1d056d12ac444db 100644 (file)
@@ -1,4 +1,4 @@
 ---
 # defaults file for ansible-rabbitmq
-enable_rabbitmq_clustering: false  #defines if setting up a rabbitmq cluster
-config_rabbitmq_ha: false  #defines if rabbitmq ha should be configured
+enable_rabbitmq_clustering: false  #defines if setting up a rabbitmq cluster...define here or in group_vars/group
+config_rabbitmq_ha: false  #defines if rabbitmq ha should be configured...define here or in group_vars/group
index 67993d0b460bfcf5104d7e79e8861da02c33624b..4bd090d86dba7adf0c1d3feb33c1c2cec73028fd 100644 (file)
@@ -1,7 +1,7 @@
 ---
 galaxy_info:
   author: Larry Smith Jr.
-  description: Installs rabbitmq (can be HA and clustered)
+  description: Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
   #company: your company (optional)
   # Some suggested licenses:
   # - BSD (default)
diff --git a/tasks/debian.yml b/tasks/debian.yml
new file mode 100644 (file)
index 0000000..563563a
--- /dev/null
@@ -0,0 +1,22 @@
+---
+- name: Add the RabbitMQ public GPG key to the apt repo
+  apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc state=present
+
+- name: Add RabbitMQ to the sources list
+  apt_repository: repo='deb http://www.rabbitmq.com/debian/ testing main' update_cache=no state=present
+
+- name: Install RabbitMQ server
+  apt: name={{ item }} update_cache=no force=yes state=installed
+  with_items:
+    - rabbitmq-server
+
+- name: Enable the RabbitMQ Management Console
+  rabbitmq_plugin: names=rabbitmq_management state=enabled
+  notify: restart rabbitmq-server
+
+- name: Ensure that the RabbitMQ service is running
+  service: name=rabbitmq-server state=started enabled=yes
+
+- name: check | checking to see if already clustered
+  stat: path=/etc/rabbitmq/clustered
+  register: clustered
index e74c1e516b71cd499500e94d5e692f18d675a217..3752d78fc5cbb48a3f18a3b504df7f058fc6cdfd 100644 (file)
@@ -1,26 +1,6 @@
----
 # tasks file for ansible-rabbitmq
-- name: Add the RabbitMQ public GPG key to the apt repo
-  apt_key: url=http://www.rabbitmq.com/rabbitmq-signing-key-public.asc state=present
-
-- name: Add RabbitMQ to the sources list
-  apt_repository: repo='deb http://www.rabbitmq.com/debian/ testing main' update_cache=no state=present
-
-- name: Install RabbitMQ server
-  apt: name={{ item }} update_cache=no force=yes state=installed
-  with_items:
-    - rabbitmq-server
-
-- name: Enable the RabbitMQ Management Console
-  rabbitmq_plugin: names=rabbitmq_management state=enabled
-  notify: restart rabbitmq-server
-
-- name: Ensure that the RabbitMQ service is running
-  service: name=rabbitmq-server state=started enabled=yes
-
-- name: check | checking to see if already clustered
-  stat: path=/etc/rabbitmq/clustered
-  register: clustered
+- include: debian.yml
+  when: ansible_os_family == "Debian"
 
 - include: rabbitmq_clustering.yml
   when: enable_rabbitmq_clustering and (clustered.stat.exists != True)