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"