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_default_db_type: cdb
|
||||
postfix_dhparam_file: /etc/ssl/private/dhparam.pem
|
||||
postfix_pflogsum_enabled: true
|
||||
postfix_pflogsum_mail_subject: "Mailserver Statistics"
|
||||
postfix_myhostname: "$myorigin"
|
||||
postfix_relayhost: ""
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
- name: TLS-helper
|
||||
ansible.builtin.import_tasks: tls-helper.yml
|
||||
tags: tls-helper
|
||||
when: postfix_type == "internet"
|
||||
|
||||
- name: MTA-STS
|
||||
ansible.builtin.include_tasks: mta-sts.yml
|
||||
|
@ -40,6 +41,7 @@
|
|||
- name: Hostname
|
||||
ansible.builtin.import_tasks: hostname.yml
|
||||
tags: hostname
|
||||
when: postfix_type == "internet"
|
||||
|
||||
- name: Monitoring
|
||||
ansible.builtin.import_tasks: monitoring.yml
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
dest: /etc/monit/conf-enabled/mta-sts-daemon
|
||||
mode: "0644"
|
||||
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:
|
||||
path: "{{ postfix_dhparam_file }}"
|
||||
size: 4096
|
||||
when: postfix_type == "internet"
|
||||
|
||||
- name: "Postfix | Setup cron job for pflogsum"
|
||||
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 }}
|
||||
hour: "06"
|
||||
minute: "24"
|
||||
when: postfix_pflogsum_enabled
|
||||
|
|
Loading…
Reference in a new issue