diff --git a/templates/postfix/conf.d/transport_relay.j2 b/templates/postfix/conf.d/transport_relay.j2 index 22349ca..3f6e34d 100644 --- a/templates/postfix/conf.d/transport_relay.j2 +++ b/templates/postfix/conf.d/transport_relay.j2 @@ -1,5 +1,6 @@ ### {{ ansible_managed }} +{% if postfix_domains is defined %} {% for domain in postfix_domains %} {% if domain.type == "relay" %} {% if domain.comment is defined %} @@ -8,3 +9,4 @@ {{ "%-50s %s" | format(domain.name, domain.relay_host) }} {% endif %} {% endfor %} +{% endif %}