diff --git a/defaults/main.yml b/defaults/main.yml index 724886b..cb2ad5c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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' diff --git a/tasks/spamassassin.yml b/tasks/spamassassin.yml index 9da02b6..3de4ed2 100644 --- a/tasks/spamassassin.yml +++ b/tasks/spamassassin.yml @@ -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'