You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/setup_rabbitmq/tasks/ubuntu.yml

39 lines
1.4 KiB
YAML

---
# 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.3.8.18-1
Pin-Priority: 1000
Package: esl-erlang
Pin: version 1:20.3.6
Pin-Priority: 1000
- name: Install https transport for apt
apt: name=apt-transport-https state=latest force=yes
- name: Add Erlang Solutions public GPG key
apt_key: url=https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc state=present
- name: Add Erlang Solutions repository
apt_repository: repo="deb https://packages.erlang-solutions.com/ubuntu {{ ansible_distribution_release }} contrib" filename='erlang-solutions' state=present update_cache=yes
- name: Install RabbitMQ Server
apt:
deb: https://s3.amazonaws.com/ansible-ci-files/test/integration/targets/setup_rabbitmq/rabbitmq-server_3.7.14-1_all.deb
- name: Start RabbitMQ service
service: name=rabbitmq-server state=started
when: ansible_distribution_release == 'trusty'
# This is an ugly workaround!
# There is a problem to run services via systemd inside docker containers (https://github.com/moby/moby/issues/2296):
# systemctl command fails with the error 'Failed to connect to bus: No such file or directory'
- name: Start RabbitMQ service
command: /etc/init.d/rabbitmq-server start
when: ansible_distribution_release == 'xenial'