parent
348642f619
commit
72a6d628e0
13 changed files with 77 additions and 6 deletions
@ -0,0 +1,20 @@ |
||||
#!/bin/bash -e |
||||
|
||||
{% if rabbitmq_letsencrypt_cert is defined %} |
||||
|
||||
{% if rabbitmq_letsencrypt_cert == True %} |
||||
{% set cert = inventory_hostname %} |
||||
{% elif rabbitmq_letsencrypt_cert is string %} |
||||
{% set cert = rabbitmq_letsencrypt_cert %} |
||||
{% endif %} |
||||
|
||||
if [ $1 == "{{ cert }}" ]; then |
||||
cp /var/lib/dehydrated/certificates/certs/{{ cert }}/fullchain.pem /etc/rabbitmq/ssl/cert.pem |
||||
cp /var/lib/dehydrated/certificates/certs/{{ cert }}/privkey.pem /etc/rabbitmq/ssl/key.pem |
||||
chown :rabbitmq /etc/rabbitmq/ssl/key.pem |
||||
chmod 644 /etc/rabbitmq/ssl/cert.pem |
||||
chmod 640 /etc/rabbitmq/ssl/key.pem |
||||
systemctl restart rabbitmq-server |
||||
fi |
||||
{% endif %} |
||||
|
@ -1,4 +1,7 @@ |
||||
listeners.tcp.default = {{ rabbitmq_port }} |
||||
listeners.ssl.default = {{ rabbitmq_ssl_port }} |
||||
ssl_options.certfile = {{ rabbitmq_ssl_cert_path }} |
||||
ssl_options.keyfile = {{ rabbitmq_ssl_key_path }} |
||||
loopback_users.guest = {{ rabbitmq_guest_from_anywhere | ternary('false','true') }} |
||||
management.tcp.port = {{ rabbitmq_web_port }} |
||||
management.tcp.ip = 0.0.0.0 |
||||
|
Loading…
Reference in new issue