X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tasks%2Fmain.yml;h=26abc8d915377004b32f03ad6b226aa19caef82d;hb=b6c0cb98568bb67c29bc54b7bc061a2138af6666;hp=e74c1e516b71cd499500e94d5e692f18d675a217;hpb=eb299d9b8716d8c5b0bdede17e29ada1f623fe43;p=github%2Ffretlink%2Fansible-rabbitmq.git diff --git a/tasks/main.yml b/tasks/main.yml index e74c1e5..26abc8d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,24 +1,14 @@ ---- # 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 +- include: debian.yml + when: ansible_os_family == "Debian" -- name: Add RabbitMQ to the sources list - apt_repository: repo='deb http://www.rabbitmq.com/debian/ testing main' update_cache=no state=present +- include: redhat.yml + when: ansible_distribution == "CentOS" or ansible_distribution == "Red Hat Enterprise Linux" -- name: Install RabbitMQ server - apt: name={{ item }} update_cache=no force=yes state=installed - with_items: - - rabbitmq-server +- include: fedora.yml + when: ansible_distribution == "Fedora" -- 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 +- name: checking to see if already clustered stat: path=/etc/rabbitmq/clustered register: clustered @@ -27,3 +17,5 @@ - include: rabbitmq_ha_config.yml when: config_rabbitmq_ha and enable_rabbitmq_clustering + +- include: rabbitmq_users.yml