diff options
author | Larry Smith Jr <mrlesmithjr@gmail.com> | 2017-05-20 21:19:34 -0400 |
---|---|---|
committer | Larry Smith Jr <mrlesmithjr@gmail.com> | 2017-05-20 21:19:34 -0400 |
commit | a67dde50f26e0f76d91f0744e8e8341dac95dae2 (patch) | |
tree | 2971e931788eddf51b9ec71ac063bfb951215d0c /tasks/main.yml | |
parent | f36f2edd9429200fbd18eeecfbba4b5fe891f26d (diff) | |
download | ansible-rabbitmq-a67dde50f26e0f76d91f0744e8e8341dac95dae2.tar.gz ansible-rabbitmq-a67dde50f26e0f76d91f0744e8e8341dac95dae2.tar.zst ansible-rabbitmq-a67dde50f26e0f76d91f0744e8e8341dac95dae2.zip |
Cleaned up code as part of issue #10enhancements/issues-9-10-11
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.com>
Diffstat (limited to 'tasks/main.yml')
-rw-r--r-- | tasks/main.yml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tasks/main.yml b/tasks/main.yml index bd82f93..1da06c4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml | |||
@@ -3,19 +3,30 @@ | |||
3 | when: ansible_os_family == "Debian" | 3 | when: ansible_os_family == "Debian" |
4 | 4 | ||
5 | - include: redhat.yml | 5 | - include: redhat.yml |
6 | when: ansible_distribution == "CentOS" or ansible_distribution == "Red Hat Enterprise Linux" | 6 | when: > |
7 | ansible_distribution == "CentOS" or | ||
8 | ansible_distribution == "Red Hat Enterprise Linux" | ||
7 | 9 | ||
8 | - include: fedora.yml | 10 | - include: fedora.yml |
9 | when: ansible_distribution == "Fedora" | 11 | when: ansible_distribution == "Fedora" |
10 | 12 | ||
13 | - include: config.yml | ||
14 | when: rabbitmq_config_service | ||
15 | |||
11 | - name: checking to see if already clustered | 16 | - name: checking to see if already clustered |
12 | stat: path=/etc/rabbitmq/clustered | 17 | stat: path=/etc/rabbitmq/clustered |
13 | register: clustered | 18 | register: clustered |
14 | 19 | ||
15 | - include: rabbitmq_clustering.yml | 20 | - include: rabbitmq_clustering.yml |
16 | when: rabbitmq_enable_clustering and (clustered.stat.exists != True) | 21 | when: > |
22 | rabbitmq_enable_clustering and | ||
23 | not clustered['stat']['exists'] | ||
17 | 24 | ||
18 | - include: rabbitmq_ha_config.yml | 25 | - include: rabbitmq_ha_config.yml |
19 | when: rabbitmq_config_ha and rabbitmq_enable_clustering | 26 | when: > |
27 | rabbitmq_config_ha and | ||
28 | rabbitmq_enable_clustering and | ||
29 | rabbitmq_config is defined | ||
20 | 30 | ||
21 | - include: rabbitmq_users.yml | 31 | - include: rabbitmq_users.yml |
32 | when: rabbitmq_users is defined | ||