pflogsumm has its own installation task.

This commit is contained in:
Andrea Dell'Amico 2021-12-04 20:04:22 +01:00
parent a4865cd41e
commit 23fc166578
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 20 additions and 3 deletions

View File

@ -7,12 +7,10 @@ postfix_relay_rh_pkgs:
- cyrus-sasl-lib
- cyrus-sasl-plain
- cyrus-sasl-md5
- postfix-perl-scripts
postfix_relay_deb_pkgs:
- postfix
- libsasl2-2
- pflogsumm
#############################################################################
# Set them to true when you want configure your machine to send email to a relay

View File

@ -1,16 +1,35 @@
---
- name: Configure pflogsumm
- name: Set the environment for pflogsumm and install the package
block:
- name: Set the postfix logfile path in EL distributions
set_fact:
postfix_logfile: /var/log/maillog
when: ansible_distribution_file_variety == "RedHat"
- name: Install the postfix-perl-scripts package on EL
ansible.builtin.yum:
pkg: postfix-perl-scripts
state: present
when: ansible_distribution_file_variety == "RedHat"
- name: Set the postfix logfile path in deb distributions
set_fact:
postfix_logfile: /var/log/mail.log
when: ansible_distribution_file_variety == "Debian"
- name: Install the pflogsumm package on deb
ansible.builtin.apt:
pkg: pflogsumm
state: present
cache_valid_time: 1800
when: ansible_distribution_file_variety == "Debian"
when: postfix_pflogsumm_reports
tags: [ 'postfix', 'postfix_pflogsumm' ]
- name: Configure pflogsumm
block:
- name: Install the pflogsumm script
ansible.builtin.template:
src: pflogsumm_report.sh.j2