mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Integration tests for rabbitmq_user module (#35421)
This commit is contained in:
parent
b9c5147be2
commit
b9571eb4bf
6 changed files with 182 additions and 0 deletions
4
test/integration/targets/setup_rabbitmq/tasks/main.yml
Normal file
4
test/integration/targets/setup_rabbitmq/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
|
||||
- include: ubuntu.yml
|
||||
when: ansible_distribution == 'Ubuntu'
|
30
test/integration/targets/setup_rabbitmq/tasks/ubuntu.yml
Normal file
30
test/integration/targets/setup_rabbitmq/tasks/ubuntu.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
|
||||
- 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: Add RabbitMQ public GPG key
|
||||
apt_key: url=https://www.rabbitmq.com/rabbitmq-release-signing-key.asc state=present
|
||||
|
||||
- name: Add RabbitMQ repository
|
||||
apt_repository: repo='deb https://dl.bintray.com/rabbitmq/debian {{ ansible_distribution_release }} main' filename='rabbitmq' state=present update_cache=yes
|
||||
|
||||
- name: Install RabbitMQ Server
|
||||
apt: name=rabbitmq-server state=latest
|
||||
|
||||
- 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'
|
Loading…
Add table
Add a link
Reference in a new issue