From a78127414c2724f0a3181e65243e28dad2111b52 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 6 Mar 2023 23:48:18 +0100 Subject: [PATCH] rabbitmq: add rabbitmq_datadir_volume parameter With the parameter rabbitmq_datadir_volume it is possible to use a directory as volume for the rabbitmq service. By default, a volume named rabbitmq is used (the previous default). Change-Id: I99d6bd71ca79cba81062dedfb767c5ed341bb182 --- ansible/group_vars/all.yml | 1 + ansible/roles/rabbitmq/defaults/main.yml | 2 +- .../notes/rabbitmq_datadir_volume-76e5524b72129144.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/rabbitmq_datadir_volume-76e5524b72129144.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 8ddb843396..1a2a3841b9 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -819,6 +819,7 @@ outward_rabbitmq_user: "openstack" rabbitmq_enable_tls: "no" # CA certificate bundle in RabbitMQ container. rabbitmq_cacert: "/etc/ssl/certs/{{ 'ca-certificates.crt' if kolla_base_distro in ['debian', 'ubuntu'] else 'ca-bundle.trust.crt' }}" +rabbitmq_datadir_volume: "rabbitmq" #################### # HAProxy options diff --git a/ansible/roles/rabbitmq/defaults/main.yml b/ansible/roles/rabbitmq/defaults/main.yml index 388369f58b..7db293ee4d 100644 --- a/ansible/roles/rabbitmq/defaults/main.yml +++ b/ansible/roles/rabbitmq/defaults/main.yml @@ -71,7 +71,7 @@ rabbitmq_default_volumes: - "{{ node_config_directory }}/{{ project_name }}/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}" - - "{{ project_name }}:/var/lib/rabbitmq/" + - "{{ rabbitmq_datadir_volume }}:/var/lib/rabbitmq/" - "kolla_logs:/var/log/kolla/" rabbitmq_extra_volumes: "{{ default_extra_volumes }}" diff --git a/releasenotes/notes/rabbitmq_datadir_volume-76e5524b72129144.yaml b/releasenotes/notes/rabbitmq_datadir_volume-76e5524b72129144.yaml new file mode 100644 index 0000000000..732a56389b --- /dev/null +++ b/releasenotes/notes/rabbitmq_datadir_volume-76e5524b72129144.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + With the parameter ``rabbitmq_datadir_volume`` it is possible + to use a directory as volume for the rabbitmq service. By default, + a volume named rabbitmq is used (the previous default).