Merge pull request #668 from javacruft/rabbitmq-new-configuration

Support new style RMQ conf files
This commit is contained in:
Liam Young
2021-11-23 14:29:57 +00:00
committed by GitHub
@@ -354,9 +354,15 @@ def is_ssl_enabled_on_unit(unit, port=None):
host = unit.public_address
unit_name = unit.entity_id
conf_file = '/etc/rabbitmq/rabbitmq.config'
conf_file = '/etc/rabbitmq/rabbitmq.conf'
conf_contents = str(generic_utils.get_file_contents(unit,
conf_file))
# Fallback to old style configuration file for
# older RMQ releases if .conf is empty/not found
if not conf_contents:
conf_file = '/etc/rabbitmq/rabbitmq.config'
conf_contents = str(generic_utils.get_file_contents(unit,
conf_file))
# Checks
conf_ssl = 'ssl' in conf_contents
conf_port = str(port) in conf_contents