Merge pull request '✨ Add RabbitMQ container on Radon' (!64) from rabbitmq into master
Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/64 Reviewed-by: dkdent <dkdent@netz39.de>
This commit is contained in:
commit
dd55181917
1 changed files with 30 additions and 0 deletions
30
radon.yml
30
radon.yml
|
@ -13,6 +13,9 @@
|
||||||
nodered_image: nodered/node-red:3.0.1-1-18
|
nodered_image: nodered/node-red:3.0.1-1-18
|
||||||
nodered_data: "{{ data_dir }}/nodered"
|
nodered_data: "{{ data_dir }}/nodered"
|
||||||
|
|
||||||
|
rabbitmq_image: "bitnami/rabbitmq:3.10.7"
|
||||||
|
rabbitmq_data: "{{ data_dir }}/rabbitmq"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: docker_setup
|
- role: docker_setup
|
||||||
vars:
|
vars:
|
||||||
|
@ -79,6 +82,33 @@
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
|
|
||||||
|
|
||||||
|
- name: Check if rabbitmq data dir exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ rabbitmq_data }}"
|
||||||
|
register: rabbitmq_dir
|
||||||
|
- name: Fail if rabbitmq data dir does not exist
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "RabbitMQ data dir is missing, please restore from the backup!"
|
||||||
|
when: not rabbitmq_dir.stat.exists
|
||||||
|
|
||||||
|
- name: Ensure rabbitmq docker container is running
|
||||||
|
docker_container:
|
||||||
|
name: rabbitmq
|
||||||
|
image: "{{ rabbitmq_image }}"
|
||||||
|
ports:
|
||||||
|
- 4369:4369
|
||||||
|
- 5551:5551
|
||||||
|
- 5552:5552
|
||||||
|
- 5672:5672
|
||||||
|
- 25672:25672
|
||||||
|
- 15672:15672
|
||||||
|
env:
|
||||||
|
RABBITMQ_SECURE_PASSWORD: "yes"
|
||||||
|
volumes:
|
||||||
|
- "{{ rabbitmq_data }}/bitnami:/bitnami:rw"
|
||||||
|
- "{{ rabbitmq_data }}/etc_rabbitmq:/etc/rabbitmq:rw"
|
||||||
|
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: restart mosquitto
|
- name: restart mosquitto
|
||||||
docker_container:
|
docker_container:
|
||||||
|
|
Loading…
Reference in a new issue