{% set rabbitmq_server__tpl_dependent_config = {} %}
{% if (rabbitmq_server__register_dependent_config|d() and rabbitmq_server__register_dependent_config.content|d()) %}
{%   set _ = rabbitmq_server__tpl_dependent_config.update(rabbitmq_server__register_dependent_config.content | b64decode | trim | from_json) %}
{% endif %}
{% if rabbitmq_server__dependent_role|d() %}
{%   if rabbitmq_server__dependent_state == 'present' %}
{%     set rabbitmq_server__tpl_flattened_config = lookup('flattened', rabbitmq_server__dependent_config) %}
{%     set _ = rabbitmq_server__tpl_dependent_config.update({
  rabbitmq_server__dependent_role: ([ rabbitmq_server__tpl_flattened_config ] if rabbitmq_server__tpl_flattened_config is mapping else rabbitmq_server__tpl_flattened_config)
}) %}
{%   elif rabbitmq_server__dependent_state == 'absent' %}
{%     set _ = rabbitmq_server__tpl_dependent_config.pop(rabbitmq_server__dependent_role, None) %}
{%   endif %}
{% endif %}
{% set rabbitmq_server__tpl_output = [] %}
{% for key, value in rabbitmq_server__tpl_dependent_config.items() %}
{%   set _ = rabbitmq_server__tpl_output.extend(value) %}
{% endfor %}
{{ rabbitmq_server__tpl_output | to_yaml }}
