{% if postfix_virtual_domains | bool %} {% for dom in postfix_virtual_alias_domains_data %} {{ dom.domain }} OK {% endfor %} {% elif postfix_virtual_addresses | bool %} {% for dom in postfix_virtual_mailbox_domains_data %} {{ dom.domain }} OK {% endfor %} {% if postfix_hostname_as_virtual_domain %} {{ ansible_fqdn }} OK {% endif %} {% else %} localdomain OK {% endif %}