]> git.immae.eu Git - github/fretlink/ansible-rabbitmq.git/commitdiff
Allow debian install from bintray with erlang from bintray use_bintray
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Wed, 12 Dec 2018 14:47:57 +0000 (15:47 +0100)
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Wed, 12 Dec 2018 16:04:42 +0000 (17:04 +0100)
defaults/main.yml
tasks/debian.yml

index 9e9f3c85f1e09a8f58c2cfef5c75966ed82f6084..aeeda6d421efd1d9c388e727c449db1fcc376ba0 100644 (file)
@@ -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
index b25d39b09cc393933332b32fc010768a40921b8f..f35bf55018b657a48482e4270894a75b0c0c44d8 100644 (file)
@@ -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: