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*
|
|
|
|
Pin: version 1:20.1-1
|
|
|
|
Pin-Priority: 1000
|
|
|
|
|
|
|
|
Package: esl-erlang
|
|
|
|
Pin: version 1:20.1.7
|
|
|
|
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
|
|
|
|
|
|
|
- name: Add Erlang Solutions public GPG key
|
2018-12-04 13:42:18 +01:00
|
|
|
apt_key:
|
|
|
|
url: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_rabbitmq/erlang_solutions.asc
|
|
|
|
state: present
|
2018-02-01 19:25:04 +01:00
|
|
|
|
|
|
|
- name: Add Erlang Solutions repository
|
2018-12-04 13:42:18 +01:00
|
|
|
apt_repository:
|
|
|
|
repo: "deb https://packages.erlang-solutions.com/ubuntu {{ ansible_distribution_release }} contrib"
|
|
|
|
filename: 'erlang-solutions'
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
2018-02-01 19:25:04 +01:00
|
|
|
|
|
|
|
- name: Add RabbitMQ public GPG key
|
2018-12-04 13:42:18 +01:00
|
|
|
apt_key:
|
|
|
|
url: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_rabbitmq/rabbitmq-release-signing-key.asc
|
|
|
|
state: present
|
2018-02-01 19:25:04 +01:00
|
|
|
|
|
|
|
- name: Add RabbitMQ repository
|
2018-12-04 13:42:18 +01:00
|
|
|
apt_repository:
|
|
|
|
repo: 'deb https://dl.bintray.com/rabbitmq/debian {{ ansible_distribution_release }} main'
|
|
|
|
filename: 'rabbitmq'
|
|
|
|
state: present
|
|
|
|
update_cache: yes
|
|
|
|
|
|
|
|
# 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:
|
|
|
|
name: rabbitmq-server
|
|
|
|
state: latest
|
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
|