Use Ansible defaults to insert comments

Enable vscodium code highlighting for some files
This commit is contained in:
phil 2024-03-27 17:39:16 +01:00
parent 4ad48694d5
commit 8c79f8b687
30 changed files with 34 additions and 30 deletions

View file

@ -9,7 +9,7 @@
- name: "Postfix | Copy master.cf"
ansible.builtin.template:
src: postfix/master.cf
src: postfix/master.cf.j2
dest: /etc/postfix/master.cf
mode: "0644"
notify: restart postfix

View file

@ -13,7 +13,7 @@
- name: "TLS-help | Copy allowlist"
ansible.builtin.template:
src: postfix/allowlist.txt
src: postfix/allowlist.txt.j2
dest: /opt/mail-tls-helper/allowlist.txt
mode: "0644"
@ -63,6 +63,6 @@
- name: "TLS-helper | Create new logrotate configuration"
ansible.builtin.template:
src: logrotate.conf
src: logrotate.conf.j2
dest: /etc/logrotate.d/maillog
mode: "0644"

View file

@ -1,3 +1,5 @@
{{ ansible_managed | comment }}
/var/log/mail.log
/var/log/mail.info
/var/log/mail.warn

View file

@ -1,3 +1,5 @@
{{ ansible_managed | comment }}
server {
listen 80;
server_name mta-sts.{{ item.name }};

View file

@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}
{% for domain in postfix_tls_helper_allowlist %}
{{ domain }}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_authorized_submit_users is defined %}
{% for user in postfix_authorized_submit_users %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
# Use this file to block SMTP-Auth access for users.
# Example:

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_bogus_mx is defined %}
{% for mx in postfix_bogus_mx %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_canonical is defined %}
{% for map in postfix_canonical %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
### With this file you can allow or disallow clients to connect to the SMTP server.

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_dlimit_domains is defined %}
{% for domain in postfix_dlimit_domains %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_header_add is defined %}
{% for header in postfix_header_add %}

View file

@ -1,4 +1,4 @@
# Managed by Ansible
{{ ansible_managed | comment }}
/^Content-(Disposition|Type).*name\s*=\s*"?([^;]*(\.|=2E)(
ade|adp|asp|bas|bat|chm|cmd|com|cpl|dll|exe|

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
# Remove sensible headers
/^Mail-System-Version:/ IGNORE

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_default_helo_checks is defined %}
{% for check in postfix_default_helo_checks %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
### Enable sender spoofing for selected accounts
{% if postfix_permit_login_mismatch is defined %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_default_postscreen_access is defined %}
{% for source in postfix_default_postscreen_access %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
### http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps
{% if postfix_relay_by_sender is defined %}

View file

@ -1 +1 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}

View file

@ -1,4 +1,4 @@
# {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_domains is defined %}
{% for domain in postfix_domains %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_sender_canonical is defined %}
{% for map in postfix_sender_canonical %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_sender_checks is defined %}
{% for sender in postfix_sender_checks %}

View file

@ -1,4 +1,4 @@
#{{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_smtp_sasl_auth_enabled is defined and postfix_smtp_sasl_auth_enabled %}
{{ "%-50s %s:%s" | format(postfix_smtp_sasl_auth_relay, postfix_smtp_sasl_auth_user, postfix_smtp_sasl_auth_password) }}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
# Use this file for mail addresses that should be treated specially.

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_domains is defined %}
{% for domain in postfix_domains %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_default_transport_tor_domains is defined %}
{% for domain in postfix_default_transport_tor_domains %}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
# Example
#

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
{% if postfix_domains is defined %}
{% for domain in postfix_domains %}

View file

@ -1,5 +1,5 @@
### {{ ansible_managed }}
### {{ template_path }}
{{ ansible_managed | comment }}
{{ template_path | comment }}
{% if postfix_smtp_banner is defined %}
smtpd_banner = {{ postfix_smtpd_banner }}

View file

@ -1,4 +1,4 @@
### {{ ansible_managed }}
{{ ansible_managed | comment }}
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args