Add conditional otherwise it fails if there is no
postfix_domains dictionary
This commit is contained in:
parent
28c7f9ca79
commit
ee7cc584b6
1 changed files with 2 additions and 0 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue