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/debian.yml | |
parent | f36f2edd9429200fbd18eeecfbba4b5fe891f26d (diff) | |
download | ansible-rabbitmq-enhancements/issues-9-10-11.tar.gz ansible-rabbitmq-enhancements/issues-9-10-11.tar.zst ansible-rabbitmq-enhancements/issues-9-10-11.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/debian.yml')
-rw-r--r-- | tasks/debian.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tasks/debian.yml b/tasks/debian.yml index a031ead..b25d39b 100644 --- a/tasks/debian.yml +++ b/tasks/debian.yml | |||
@@ -3,22 +3,26 @@ | |||
3 | apt_key: | 3 | apt_key: |
4 | url: "{{ rabbitmq_debian_repo_key }}" | 4 | url: "{{ rabbitmq_debian_repo_key }}" |
5 | state: present | 5 | state: present |
6 | become: true | ||
6 | 7 | ||
7 | - name: debian | adding RabbitMQ repo | 8 | - name: debian | adding RabbitMQ repo |
8 | apt_repository: | 9 | apt_repository: |
9 | repo: "{{ rabbitmq_debian_repo }}" | 10 | repo: "{{ rabbitmq_debian_repo }}" |
10 | state: present | 11 | state: present |
11 | register: "rabbitmq_repo_added" | 12 | register: "rabbitmq_repo_added" |
13 | become: true | ||
12 | 14 | ||
13 | - name: debian | updating apt cache | 15 | - name: debian | updating apt cache |
14 | apt: | 16 | apt: |
15 | update_cache: yes | 17 | update_cache: yes |
18 | become: true | ||
16 | when: rabbitmq_repo_added.changed | 19 | when: rabbitmq_repo_added.changed |
17 | 20 | ||
18 | - name: debian | installing RabbitMQ server | 21 | - name: debian | installing RabbitMQ server |
19 | apt: | 22 | apt: |
20 | name: "{{ item }}" | 23 | name: "{{ item }}" |
21 | state: present | 24 | state: present |
25 | become: true | ||
22 | with_items: | 26 | with_items: |
23 | - rabbitmq-server | 27 | - rabbitmq-server |
24 | 28 | ||
@@ -26,6 +30,7 @@ | |||
26 | rabbitmq_plugin: | 30 | rabbitmq_plugin: |
27 | names: rabbitmq_management | 31 | names: rabbitmq_management |
28 | state: enabled | 32 | state: enabled |
33 | become: true | ||
29 | notify: restart rabbitmq-server | 34 | notify: restart rabbitmq-server |
30 | 35 | ||
31 | - name: debian | ensuring that the RabbitMQ service is running | 36 | - name: debian | ensuring that the RabbitMQ service is running |
@@ -33,3 +38,4 @@ | |||
33 | name: rabbitmq-server | 38 | name: rabbitmq-server |
34 | state: started | 39 | state: started |
35 | enabled: yes | 40 | enabled: yes |
41 | become: true | ||