From 66ae1a89d7d9024f4a2cae0a602e8507119f0708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Wed, 12 Dec 2018 15:47:57 +0100 Subject: Allow debian install from bintray with erlang from bintray --- defaults/main.yml | 5 +++++ 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 rabbitmq_config_file: 'etc/rabbitmq/rabbitmq.config.j2' rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main' +#other repos +#rabbitmq_debian_repo: deb https://dl.bintray.com/rabbitmq/debian {{ ansible_distribution_release }} main #bintray rabbitmq_debian_repo_key: 'https://www.rabbitmq.com/rabbitmq-release-signing-key.asc' +#rabbitmq_debian_repo_key: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq +rabbitmq_debian_erlang_from_rabbit: false +#rabbitmq_debian_version: 3.7.9 # current version if not defined # Defines if setting up a rabbitmq cluster 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 @@ apt_repository: repo: "{{ rabbitmq_debian_repo }}" state: present - register: "rabbitmq_repo_added" become: true -- name: debian | updating apt cache - apt: - update_cache: yes +- name: debian | add Rabbitmq erlang repo key + apt_key: + url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang + state: present + become: true + when: rabbitmq_debian_erlang_from_rabbit + +- name: debian | add Rabbitmq erlang repo + apt_repository: + repo: deb https://dl.bintray.com/rabbitmq-erlang/debian {{ ansible_distribution_release }} erlang + state: present become: true - when: rabbitmq_repo_added.changed + when: rabbitmq_debian_erlang_from_rabbit - name: debian | installing RabbitMQ server apt: @@ -24,7 +31,7 @@ state: present become: true with_items: - - rabbitmq-server + - rabbitmq-server{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'')}} - name: debian | enabling the RabbitMQ Management Console rabbitmq_plugin: -- cgit v1.2.3