{% set minio__tpl_ferm_dependent_rules = [] %}
{% for element in minio__combined_instances | parse_kv_items %}
{%   if (element.name|d() and element.port|d() and element.state|d('present') not in [ 'ignore', 'init' ]) %}
{%     set rule = {'type': 'accept',
                   'rule_state': element.state,
                   'dport': [ element.port|string ],
                   'saddr': (( [ element.allow ] if (element.allow is string) else element.allow) if element.allow|d() else []),
                   'accept_any': True,
                   'weight': '50',
                   'by_role': 'debops.minio',
                   'name': ('minio-' + element.name)} %}
{%     set _ = minio__tpl_ferm_dependent_rules.append(rule) %}
{%   endif %}
{% endfor %}
{{ minio__tpl_ferm_dependent_rules | to_yaml }}
