From 9421e125cb5faa0acdf5e4a3a4c0264fb044bb83 Mon Sep 17 00:00:00 2001 From: James Antill Date: Sun, 22 Jun 2025 16:32:12 -0400 Subject: [PATCH] rabbitmq: Expliticly set HOME to /var/lib/rabbitmq. Signed-off-by: James Antill --- roles/rabbitmq_cluster/templates/rabbitmq-env.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/rabbitmq_cluster/templates/rabbitmq-env.conf b/roles/rabbitmq_cluster/templates/rabbitmq-env.conf index f031bf4db0..0191928185 100644 --- a/roles/rabbitmq_cluster/templates/rabbitmq-env.conf +++ b/roles/rabbitmq_cluster/templates/rabbitmq-env.conf @@ -1,3 +1,12 @@ +{% if ansible_distribution_major_version|int >= 9 and ansible_distribution == 'RedHat' %} +# Not obvious why this is now needed with el9, but we go out of our +# way to remove the user and el9 fails to start because of SELinux +# access problems on /home/fedora/rabbitmq/.erlang.cookie (which +# doesn't exit, but even if it does and contains the cookie SELinux +# fails). +HOME=/var/lib/rabbitmq +{% endif %} + NODENAME="rabbit" USE_LONGNAME="true"