Add conditionals to disable tasks dor intenal mail servers
This commit is contained in:
parent
df43829b66
commit
5d6c3e0f77
4 changed files with 6 additions and 1 deletions
|
@ -10,6 +10,7 @@ postfix_conf_dir: /etc/postfix/conf.d
|
||||||
postfix_daemon_dir: /usr/lib/postfix/sbin
|
postfix_daemon_dir: /usr/lib/postfix/sbin
|
||||||
postfix_default_db_type: cdb
|
postfix_default_db_type: cdb
|
||||||
postfix_dhparam_file: /etc/ssl/private/dhparam.pem
|
postfix_dhparam_file: /etc/ssl/private/dhparam.pem
|
||||||
|
postfix_pflogsum_enabled: true
|
||||||
postfix_pflogsum_mail_subject: "Mailserver Statistics"
|
postfix_pflogsum_mail_subject: "Mailserver Statistics"
|
||||||
postfix_myhostname: "$myorigin"
|
postfix_myhostname: "$myorigin"
|
||||||
postfix_relayhost: ""
|
postfix_relayhost: ""
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
- name: TLS-helper
|
- name: TLS-helper
|
||||||
ansible.builtin.import_tasks: tls-helper.yml
|
ansible.builtin.import_tasks: tls-helper.yml
|
||||||
tags: tls-helper
|
tags: tls-helper
|
||||||
|
when: postfix_type == "internet"
|
||||||
|
|
||||||
- name: MTA-STS
|
- name: MTA-STS
|
||||||
ansible.builtin.include_tasks: mta-sts.yml
|
ansible.builtin.include_tasks: mta-sts.yml
|
||||||
|
@ -40,6 +41,7 @@
|
||||||
- name: Hostname
|
- name: Hostname
|
||||||
ansible.builtin.import_tasks: hostname.yml
|
ansible.builtin.import_tasks: hostname.yml
|
||||||
tags: hostname
|
tags: hostname
|
||||||
|
when: postfix_type == "internet"
|
||||||
|
|
||||||
- name: Monitoring
|
- name: Monitoring
|
||||||
ansible.builtin.import_tasks: monitoring.yml
|
ansible.builtin.import_tasks: monitoring.yml
|
||||||
|
|
|
@ -13,4 +13,4 @@
|
||||||
dest: /etc/monit/conf-enabled/mta-sts-daemon
|
dest: /etc/monit/conf-enabled/mta-sts-daemon
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify: reload monit
|
notify: reload monit
|
||||||
when: "'monit' in ansible_facts.packages"
|
when: "'monit' in ansible_facts.packages and postfix_type == 'internet'"
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
community.crypto.openssl_dhparam:
|
community.crypto.openssl_dhparam:
|
||||||
path: "{{ postfix_dhparam_file }}"
|
path: "{{ postfix_dhparam_file }}"
|
||||||
size: 4096
|
size: 4096
|
||||||
|
when: postfix_type == "internet"
|
||||||
|
|
||||||
- name: "Postfix | Setup cron job for pflogsum"
|
- name: "Postfix | Setup cron job for pflogsum"
|
||||||
ansible.builtin.cron:
|
ansible.builtin.cron:
|
||||||
|
@ -81,3 +82,4 @@
|
||||||
job: /usr/sbin/pflogsumm --detail 8 --problems-first --no-no-msg-size --reject-detail 12 /var/log/mail.log.1 | mail -s "{{ postfix_pflogsum_mail_subject }} ({{ inventory_hostname }})" {{ postfix_pflogsum_recipient }}
|
job: /usr/sbin/pflogsumm --detail 8 --problems-first --no-no-msg-size --reject-detail 12 /var/log/mail.log.1 | mail -s "{{ postfix_pflogsum_mail_subject }} ({{ inventory_hostname }})" {{ postfix_pflogsum_recipient }}
|
||||||
hour: "06"
|
hour: "06"
|
||||||
minute: "24"
|
minute: "24"
|
||||||
|
when: postfix_pflogsum_enabled
|
||||||
|
|
Loading…
Reference in a new issue