Role Name
=========
-Installs rabbitmq https://www.rabbitmq.com/
+Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
Requirements
------------
---
# 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
---
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)
--- /dev/null
+---
+- 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
----
# 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)