Optionally skip the installation of additional perl modules.

This commit is contained in:
Andrea Dell'Amico 2026-09-28 12:12:22 +02:00
parent 0969b96971
commit 1d8547537f
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 8 additions and 1 deletions

View File

@ -121,6 +121,10 @@ spamassassin_ole2macro_github_plugin_score: '3'
# https://github.com/bigio/spamassassin-dmarc
spamassassin_dmarc_github_plugin: True
# Set to false on legacy systems where the current Mail::DMARC::PurePerl CPAN
# release no longer supports the system Perl. The role will keep managing the
# already installed plugin code and configuration.
spamassassin_dmarc_install_perl_module: true
spamassassin_dmarc_github_reject_score: '0.3'
spamassassin_dmarc_github_qar_score: '0.2'
spamassassin_dmarc_github_dmarc_none_score: '0.1'

View File

@ -139,13 +139,16 @@
block:
- name: dmarc required packages, EL
yum: pkg={{ spamassassin_dmarc_perl_requirements }} state=present
when: ansible_distribution_file_variety == "RedHat"
when:
- spamassassin_dmarc_install_perl_module | bool
- ansible_distribution_file_variety == "RedHat"
- name: Install the DMARC Perl module from CPAN
community.general.cpanm:
name: '{{ item }}'
become: true
loop: '{{ spamassassin_dmarc_perl_packages }}'
when: spamassassin_dmarc_install_perl_module | bool
- name: Get the dmarc plugin code from github
get_url: url={{ spamassassin_dmarc_github_plugin_url }} dest={{ spamassassin_conf_dir }}/dmarc.pm owner=root group=root mode='0644'