2018-02-01 19:25:04 +01:00
|
|
|
---
|
2018-06-25 21:29:45 +02:00
|
|
|
# https://www.rabbitmq.com/install-debian.html#apt-pinning
|
|
|
|
- name: Pin erlang version that rabbitmq supports
|
|
|
|
copy:
|
|
|
|
dest: /etc/apt/preferences.d/erlang
|
|
|
|
content: |
|
|
|
|
Package: erlang*
|
2019-05-16 17:15:59 +02:00
|
|
|
Pin: version 1:20.3.8.18-1
|
2018-06-25 21:29:45 +02:00
|
|
|
Pin-Priority: 1000
|
|
|
|
|
|
|
|
Package: esl-erlang
|
2019-01-18 01:29:39 +01:00
|
|
|
Pin: version 1:20.3.6
|
2018-06-25 21:29:45 +02:00
|
|
|
Pin-Priority: 1000
|
|
|
|
|
2018-02-01 19:25:04 +01:00
|
|
|
- name: Install https transport for apt
|
2018-12-04 13:42:18 +01:00
|
|
|
apt:
|
|
|
|
name: apt-transport-https
|
|
|
|
state: latest
|
|
|
|
force: yes
|
2018-02-01 19:25:04 +01:00
|
|
|
|
2019-06-07 01:55:12 +02:00
|
|
|
- name: Add RabbitMQ release signing key
|
2018-12-04 13:42:18 +01:00
|
|
|
apt_key:
|
2019-06-07 01:55:12 +02:00
|
|
|
url: https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/setup_rabbitmq/rabbitmq-release-signing-key.asc
|
2018-12-04 13:42:18 +01:00
|
|
|
state: present
|
2018-02-01 19:25:04 +01:00
|
|
|
|
2019-06-07 01:55:12 +02:00
|
|
|
- name: Add RabbitMQ Erlang repository
|
2018-12-04 13:42:18 +01:00
|
|
|
apt_repository:
|
2019-06-07 01:55:12 +02:00
|
|
|
repo: "deb https://dl.bintray.com/rabbitmq-erlang/debian {{ ansible_distribution_release }} erlang-20.x"
|
|
|
|
filename: 'rabbitmq-erlang'
|
2018-12-04 13:42:18 +01:00
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2018-02-01 19:25:04 +01:00
|
|
|
|
2018-12-04 13:42:18 +01:00
|
|
|
# Required by the rabbitmq modules that uses the management API
|
|
|
|
- name: Install requests
|
|
|
|
pip:
|
|
|
|
name: requests
|
2018-02-01 19:25:04 +01:00
|
|
|
|
|
|
|
- name: Install RabbitMQ Server
|
2018-12-04 13:42:18 +01:00
|
|
|
apt:
|
2019-04-30 18:40:01 +02:00
|
|
|
deb: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_rabbitmq/rabbitmq-server_3.7.14-1_all.deb
|
2018-02-01 19:25:04 +01:00
|
|
|
|
2019-01-11 18:25:04 +01:00
|
|
|
- name: Install RabbitMQ TLS dependencies
|
|
|
|
apt:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: latest
|
|
|
|
loop:
|
|
|
|
- erlang-asn1
|
|
|
|
- erlang-crypto
|
|
|
|
- erlang-public-key
|
|
|
|
- erlang-ssl
|
|
|
|
|
|
|
|
- name: Ensure TLS config
|
|
|
|
copy:
|
|
|
|
src: rabbitmq.conf
|
|
|
|
dest: /etc/rabbitmq/rabbitmq.conf
|
|
|
|
|
2018-02-01 19:25:04 +01:00
|
|
|
- name: Start RabbitMQ service
|
2018-12-04 13:42:18 +01:00
|
|
|
service:
|
|
|
|
name: rabbitmq-server
|
|
|
|
state: started
|
|
|
|
|
|
|
|
- name: Enable management
|
|
|
|
command: rabbitmq-plugins enable --online rabbitmq_management
|