blocky_default_mappings: - tld: "{{ int_tld }}" resolver: "{%- if services.internal_ns is mapping -%}\ {{- hostvars[services.internal_ns.hostname]['ansible_host'] -}}\ {%- else -%}\ {{- hostvars | dict2items | selectattr('key', 'in', services.internal_ns | map(attribute='hostname')) | map(attribute='value') | list | map(attribute='ansible_host') | list | join(',') -}}\ {%- endif -%}"