diff --git a/core/src/epicli/data/common/ansible/playbooks/roles/rabbitmq/templates/rabbitmq-env.conf.j2 b/core/src/epicli/data/common/ansible/playbooks/roles/rabbitmq/templates/rabbitmq-env.conf.j2 index c2df4e0316..e1049e84b8 100644 --- a/core/src/epicli/data/common/ansible/playbooks/roles/rabbitmq/templates/rabbitmq-env.conf.j2 +++ b/core/src/epicli/data/common/ansible/playbooks/roles/rabbitmq/templates/rabbitmq-env.conf.j2 @@ -1,4 +1,12 @@ +{% if specification.rabbitmq_use_longname|lower == 'autoconfigured' %} +{% if ansible_hostname == ansible_fqdn %} +RABBITMQ_USE_LONGNAME=False +{% else %} +RABBITMQ_USE_LONGNAME=True +{% endif %} +{% else %} RABBITMQ_USE_LONGNAME={{ specification.rabbitmq_use_longname }} +{% endif %} # Specifies new style config file location CONFIG_FILE=/etc/rabbitmq/rabbitmq.conf diff --git a/core/src/epicli/data/common/defaults/configuration/rabbitmq.yml b/core/src/epicli/data/common/defaults/configuration/rabbitmq.yml index ddacc0ac4e..da923cb9f3 100644 --- a/core/src/epicli/data/common/defaults/configuration/rabbitmq.yml +++ b/core/src/epicli/data/common/defaults/configuration/rabbitmq.yml @@ -11,7 +11,7 @@ specification: ulimit_open_files: 65535 amqp_port: 5672 - rabbitmq_use_longname: false + rabbitmq_use_longname: AUTOCONFIGURED # true/false/AUTOCONFIGURED rabbitmq_policies: [] rabbitmq_plugins: [] custom_configurations: []