mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Setup TLS integration test for RabbitMQ (#50363)
* Make TLS available for RabbitMQ * Use correct path * Include cleanup * Also remove unused package * Don't generate a TLS cert every time if one already has been generated * Add newlines, clean up repository and clarify block purpose * One too many new lines :) * Make TLS certs static
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
listeners.ssl.default = 5671
|
||||
|
||||
ssl_options.cacertfile = /tls/ca_certificate.pem
|
||||
ssl_options.certfile = /tls/server_certificate.pem
|
||||
ssl_options.keyfile = /tls/server_key.pem
|
||||
ssl_options.password = bunnies
|
||||
ssl_options.verify = verify_peer
|
||||
ssl_options.fail_if_no_peer_cert = false
|
||||
3
test/integration/targets/setup_rabbitmq/meta/main.yml
Normal file
3
test/integration/targets/setup_rabbitmq/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- setup_tls
|
||||
@@ -1,4 +1,3 @@
|
||||
---
|
||||
|
||||
- include: ubuntu.yml
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
# https://www.rabbitmq.com/install-debian.html#apt-pinning
|
||||
- name: Pin erlang version that rabbitmq supports
|
||||
copy:
|
||||
@@ -38,8 +37,8 @@
|
||||
|
||||
- name: Add RabbitMQ repository
|
||||
apt_repository:
|
||||
repo: 'deb https://dl.bintray.com/rabbitmq/debian {{ ansible_distribution_release }} main'
|
||||
filename: 'rabbitmq'
|
||||
repo: "deb https://dl.bintray.com/rabbitmq/debian {{ ansible_distribution_release }} main"
|
||||
filename: rabbitmq
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
@@ -53,6 +52,21 @@
|
||||
name: rabbitmq-server
|
||||
state: latest
|
||||
|
||||
- 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
|
||||
|
||||
- name: Start RabbitMQ service
|
||||
service:
|
||||
name: rabbitmq-server
|
||||
|
||||
Reference in New Issue
Block a user