24 lines
928 B
YAML
24 lines
928 B
YAML
---
|
|
- name: "Monitoring | Enable Monit monitoring for Postfix"
|
|
ansible.builtin.copy:
|
|
src: monit/postfix
|
|
dest: /etc/monit/conf-enabled/postfix
|
|
mode: "0644"
|
|
notify: reload monit
|
|
when: "'monit' in ansible_facts.packages"
|
|
|
|
- name: "Monitoring | Enable Monit Monitoring for MTA-STS"
|
|
ansible.builtin.copy:
|
|
src: monit/mta-sts-daemon
|
|
dest: /etc/monit/conf-enabled/mta-sts-daemon
|
|
mode: "0644"
|
|
notify: reload monit
|
|
when: "'monit' in ansible_facts.packages and postfix_type == 'internet'"
|
|
|
|
- name: "Monitoring | Setup cron job for pflogsum"
|
|
ansible.builtin.cron:
|
|
name: "Daily pflogsum statistics"
|
|
job: '/usr/sbin/pflogsumm {{ pflogsumm_options }} {{ pflogsumm_file }} | mail -s "{{ postfix_pflogsumm_mail_subject }} ({{ inventory_hostname }})" {{ postfix_pflogsumm_recipient }}'
|
|
hour: "{{ pflogsumm_cron_hour }}"
|
|
minute: "{{ pflogsumm_cron_minute }}"
|
|
when: postfix_pflogsumm_enabled
|