diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-12-12 15:47:57 +0100 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-12-12 17:04:42 +0100 |
commit | 66ae1a89d7d9024f4a2cae0a602e8507119f0708 (patch) | |
tree | ff157426a38882f065f8c1b33ca934e71a46cb8e | |
parent | 991fe83812bb2814096e8ec3e8f6dc86fee5f3ef (diff) | |
download | ansible-rabbitmq-66ae1a89d7d9024f4a2cae0a602e8507119f0708.tar.gz ansible-rabbitmq-66ae1a89d7d9024f4a2cae0a602e8507119f0708.tar.zst ansible-rabbitmq-66ae1a89d7d9024f4a2cae0a602e8507119f0708.zip |
Allow debian install from bintray with erlang from bintrayuse_bintray
-rw-r--r-- | defaults/main.yml | 5 | ||||
-rw-r--r-- | tasks/debian.yml | 19 |
2 files changed, 18 insertions, 6 deletions
diff --git a/defaults/main.yml b/defaults/main.yml index 9e9f3c8..aeeda6d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml | |||
@@ -15,7 +15,12 @@ rabbitmq_config_service: false | |||
15 | rabbitmq_config_file: 'etc/rabbitmq/rabbitmq.config.j2' | 15 | rabbitmq_config_file: 'etc/rabbitmq/rabbitmq.config.j2' |
16 | 16 | ||
17 | rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main' | 17 | rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main' |
18 | #other repos | ||
19 | #rabbitmq_debian_repo: deb https://dl.bintray.com/rabbitmq/debian {{ ansible_distribution_release }} main #bintray | ||
18 | rabbitmq_debian_repo_key: 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc' | 20 | rabbitmq_debian_repo_key: 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc' |
21 | #rabbitmq_debian_repo_key: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq | ||
22 | rabbitmq_debian_erlang_from_rabbit: false | ||
23 | #rabbitmq_debian_version: 3.7.9 # current version if not defined | ||
19 | 24 | ||
20 | # Defines if setting up a rabbitmq cluster | 25 | # Defines if setting up a rabbitmq cluster |
21 | rabbitmq_enable_clustering: false | 26 | rabbitmq_enable_clustering: false |
diff --git a/tasks/debian.yml b/tasks/debian.yml index b25d39b..f35bf55 100644 --- a/tasks/debian.yml +++ b/tasks/debian.yml | |||
@@ -9,14 +9,21 @@ | |||
9 | apt_repository: | 9 | apt_repository: |
10 | repo: "{{ rabbitmq_debian_repo }}" | 10 | repo: "{{ rabbitmq_debian_repo }}" |
11 | state: present | 11 | state: present |
12 | register: "rabbitmq_repo_added" | ||
13 | become: true | 12 | become: true |
14 | 13 | ||
15 | - name: debian | updating apt cache | 14 | - name: debian | add Rabbitmq erlang repo key |
16 | apt: | 15 | apt_key: |
17 | update_cache: yes | 16 | url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang |
17 | state: present | ||
18 | become: true | ||
19 | when: rabbitmq_debian_erlang_from_rabbit | ||
20 | |||
21 | - name: debian | add Rabbitmq erlang repo | ||
22 | apt_repository: | ||
23 | repo: deb https://dl.bintray.com/rabbitmq-erlang/debian {{ ansible_distribution_release }} erlang | ||
24 | state: present | ||
18 | become: true | 25 | become: true |
19 | when: rabbitmq_repo_added.changed | 26 | when: rabbitmq_debian_erlang_from_rabbit |
20 | 27 | ||
21 | - name: debian | installing RabbitMQ server | 28 | - name: debian | installing RabbitMQ server |
22 | apt: | 29 | apt: |
@@ -24,7 +31,7 @@ | |||
24 | state: present | 31 | state: present |
25 | become: true | 32 | become: true |
26 | with_items: | 33 | with_items: |
27 | - rabbitmq-server | 34 | - rabbitmq-server{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'')}} |
28 | 35 | ||
29 | - name: debian | enabling the RabbitMQ Management Console | 36 | - name: debian | enabling the RabbitMQ Management Console |
30 | rabbitmq_plugin: | 37 | rabbitmq_plugin: |