aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authorLarry Smith Jr <mrlesmithjr@gmail.com>2018-12-19 09:52:51 -0500
committerLarry Smith Jr <mrlesmithjr@gmail.com>2018-12-20 00:56:13 -0500
commit2cf26261f48bbd3f172b8a529df25906822ff219 (patch)
tree98a98010684a74fb9045f87cc7c3acef599cc779 /tasks
parent7437143766ca1584696fe6e828b25ed83930f478 (diff)
downloadansible-rabbitmq-2cf26261f48bbd3f172b8a529df25906822ff219.tar.gz
ansible-rabbitmq-2cf26261f48bbd3f172b8a529df25906822ff219.tar.zst
ansible-rabbitmq-2cf26261f48bbd3f172b8a529df25906822ff219.zip
First commit of refactoring
Diffstat (limited to 'tasks')
-rw-r--r--tasks/debian.yml6
-rw-r--r--tasks/main.yml3
-rw-r--r--tasks/rabbitmq_ha_config.yml16
3 files changed, 7 insertions, 18 deletions
diff --git a/tasks/debian.yml b/tasks/debian.yml
index c98ff68..317932e 100644
--- a/tasks/debian.yml
+++ b/tasks/debian.yml
@@ -20,6 +20,8 @@
20 url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang 20 url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang
21 state: present 21 state: present
22 become: true 22 become: true
23 register: result
24 until: result is successful
23 when: rabbitmq_debian_erlang_from_rabbit 25 when: rabbitmq_debian_erlang_from_rabbit
24 26
25- name: debian | add Rabbitmq erlang repo 27- name: debian | add Rabbitmq erlang repo
@@ -34,8 +36,10 @@
34 name: ['rabbitmq-server'] 36 name: ['rabbitmq-server']
35 state: present 37 state: present
36 become: true 38 become: true
39 register: result
40 until: result is successful
37 with_items: 41 with_items:
38 - rabbitmq-server{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'')}} 42 - rabbitmq-server{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'') }}
39 43
40- name: debian | enabling the RabbitMQ Management Console 44- name: debian | enabling the RabbitMQ Management Console
41 rabbitmq_plugin: 45 rabbitmq_plugin:
diff --git a/tasks/main.yml b/tasks/main.yml
index 8905c0b..3205473 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -15,7 +15,8 @@
15 when: rabbitmq_config_service 15 when: rabbitmq_config_service
16 16
17- name: checking to see if already clustered 17- name: checking to see if already clustered
18 stat: path=/etc/rabbitmq/clustered 18 stat:
19 path: /etc/rabbitmq/clustered
19 become: true 20 become: true
20 register: clustered 21 register: clustered
21 22
diff --git a/tasks/rabbitmq_ha_config.yml b/tasks/rabbitmq_ha_config.yml
index cc31333..cea301c 100644
--- a/tasks/rabbitmq_ha_config.yml
+++ b/tasks/rabbitmq_ha_config.yml
@@ -13,22 +13,6 @@
13 notify: restart rabbitmq-server 13 notify: restart rabbitmq-server
14 when: not rabbitmqadmin_check['stat']['exists'] 14 when: not rabbitmqadmin_check['stat']['exists']
15 15
16# - name: rabbitmq_ha_config | install rabbitMQ admin
17# shell: wget http://guest:guest@localhost:15672/cli/rabbitmqadmin
18# become: true
19# when: not rabbitmqadmin_check['stat']['exists']
20
21# - name: rabbitmq_ha_config | moving the rabbitMQ Admin
22# shell: mv rabbitmqadmin /usr/sbin
23# become: true
24# when: not rabbitmqadmin_check['stat']['exists']
25
26# - name: rabbitmq_ha_config | making executable rabbitMQ Admin
27# shell: chmod +x /usr/sbin/rabbitmqadmin
28# notify: restart rabbitmq-server
29# become: true
30# when: not rabbitmqadmin_check['stat']['exists']
31
32- name: rabbitmq_ha_config | creating queue(s) 16- name: rabbitmq_ha_config | creating queue(s)
33 command: rabbitmqadmin declare queue name={{ item['queue_name'] }} durable={{ item['durable']|lower }} --vhost={{ item['vhost'] | default('/') }} 17 command: rabbitmqadmin declare queue name={{ item['queue_name'] }} durable={{ item['durable']|lower }} --vhost={{ item['vhost'] | default('/') }}
34 run_once: true 18 run_once: true