From a06e4a79a5331952ad31c737fbd3d7d82eaa6eb5 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Thu, 6 Aug 2015 20:25:37 -0400 Subject: updated tasks based on Debian --- tasks/debian.yml | 22 ++++++++++++++++++++++ tasks/main.yml | 24 ++---------------------- 2 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 tasks/debian.yml (limited to 'tasks') 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 @@ +--- +- 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 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 @@ ---- # 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) -- cgit v1.2.3