Move pflogsum task to monitoring file

This commit is contained in:
phil 2023-04-27 07:31:46 +02:00
parent a370641d6b
commit 98d6f243a8
2 changed files with 8 additions and 8 deletions

View file

@ -14,3 +14,11 @@
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 --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: "{{ pflogsum_cron_hour }}"
minute: "{{ pflogsum_cron_minute }}"
when: postfix_pflogsum_enabled

View file

@ -75,11 +75,3 @@
path: "{{ postfix_dhparam_file }}"
size: 4096
when: postfix_type == "internet"
- name: "Postfix | Setup cron job for pflogsum"
ansible.builtin.cron:
name: "Daily pflogsum statistics"
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: "{{ pflogsum_cron_hour }}"
minute: "{{ pflogsum_cron_minute }}"
when: postfix_pflogsum_enabled