diff --git a/tasks/postfix.yml b/tasks/postfix.yml index ae3d703..08965c6 100644 --- a/tasks/postfix.yml +++ b/tasks/postfix.yml @@ -5,6 +5,7 @@ dest: /etc/postfix/main.cf mode: "0644" notify: reload postfix + tags: maincf - name: "Postfix | Copy master.cf" ansible.builtin.template: @@ -12,6 +13,7 @@ dest: /etc/postfix/master.cf mode: "0644" notify: restart postfix + tags: mastercf - name: "Postfix | Create configuration directory" ansible.builtin.file: diff --git a/templates/postfix/conf.d/bogus_mx.j2 b/templates/postfix/conf.d/bogus_mx.j2 index 112434b..0679512 100644 --- a/templates/postfix/conf.d/bogus_mx.j2 +++ b/templates/postfix/conf.d/bogus_mx.j2 @@ -1,4 +1,4 @@ -### {{ managed_by_ansible }} +### {{ ansible_managed }} {% if postfix_bogus_mx is defined %} {% for mx in postfix_bogus_mx %} diff --git a/templates/postfix/conf.d/canonical.j2 b/templates/postfix/conf.d/canonical.j2 index 2585cd1..9b105b9 100644 --- a/templates/postfix/conf.d/canonical.j2 +++ b/templates/postfix/conf.d/canonical.j2 @@ -1,4 +1,4 @@ -### {{ managed_by_ansible }} +### {{ ansible_managed }} {% if postfix_canonical_maps is defined %} {% for map in postfix_canonical_maps %} diff --git a/templates/postfix/conf.d/sender_canonical.j2 b/templates/postfix/conf.d/sender_canonical.j2 index d06f03c..e56566d 100644 --- a/templates/postfix/conf.d/sender_canonical.j2 +++ b/templates/postfix/conf.d/sender_canonical.j2 @@ -1,4 +1,4 @@ -### {{ managed_by_ansible }} +### {{ ansible_managed }} {% if postfix_sender_canonical_maps is defined %} {% for map in postfix_sender_canonical_maps %} diff --git a/templates/postfix/conf.d/virtual_aliases b/templates/postfix/conf.d/virtual_aliases.j2 similarity index 95% rename from templates/postfix/conf.d/virtual_aliases rename to templates/postfix/conf.d/virtual_aliases.j2 index 576d043..28b3d18 100644 --- a/templates/postfix/conf.d/virtual_aliases +++ b/templates/postfix/conf.d/virtual_aliases.j2 @@ -1,4 +1,4 @@ -# {{ ansible_managed }} +### {{ ansible_managed }} # Example # diff --git a/templates/postfix/conf.d/virtual_domains.j2 b/templates/postfix/conf.d/virtual_domains.j2 index 440ab74..f67c599 100644 --- a/templates/postfix/conf.d/virtual_domains.j2 +++ b/templates/postfix/conf.d/virtual_domains.j2 @@ -1,4 +1,4 @@ -# {{ ansible_managed }} +### {{ ansible_managed }} {% if postfix_domains is defined %} {% for domain in postfix_domains %} diff --git a/templates/postfix/main.cf.j2 b/templates/postfix/main.cf.j2 index ae6f619..b7b2b06 100644 --- a/templates/postfix/main.cf.j2 +++ b/templates/postfix/main.cf.j2 @@ -116,7 +116,7 @@ transport_maps = {% endfor %} {% endif %} -relayhost: {{ postfix_relayhost}} +relayhost = {{ postfix_relayhost}} {% if postfix_canonical_maps is defined %} canonical_maps = @@ -137,7 +137,7 @@ sender_canonical_maps = # Prevents delays caused by NIS queries {% endif %} alias_maps = -{% for map in postfix_alias_map %} +{% for map in postfix_alias_maps %} {{ map.type }}:{{ map.path }} {% endfor %}