Installl some missing perl modules. Remove the sought rules.
This commit is contained in:
parent
9e6eb8241b
commit
763e5484e6
|
@ -7,6 +7,7 @@ Installs and configures spamassassin, <https://spamassassin.apache.org>
|
|||
|
||||
* Currently supports PostgreSQL as remote backend
|
||||
* The sql present in the `files` directory is valid for spamassassin 3.4
|
||||
* Run `spamassassin -D --lint 2>&1 | grep -i failed` to verify that all the required perl packages are present
|
||||
|
||||
TODO
|
||||
----
|
||||
|
|
|
@ -5,6 +5,8 @@ spamassassin_sql_backend: False
|
|||
spamassassin_required_hits: 5
|
||||
spamassassin_report_safe: '0'
|
||||
spamassassin_rewrite_subject: "[SPAM]"
|
||||
spamassassin_disable_soughtrules: True
|
||||
spamassassin_rules_version: '3.004000'
|
||||
|
||||
spamassassin_listen_ip: '127.0.0.1'
|
||||
spamassassin_authorized_ip_addresses: '127.0.0.1'
|
||||
|
|
|
@ -11,6 +11,13 @@
|
|||
yum: pkg={{ spamassassin_sql_rh_packages }} state=present
|
||||
when: spamassassin_db_user_config | bool
|
||||
|
||||
- name: Perl modules, from CPAN
|
||||
cpanm:
|
||||
name: '{{ item }}'
|
||||
installdeps: True
|
||||
system_lib: False
|
||||
with_items: '{{ spamassassin_rh_perl_packages }}'
|
||||
|
||||
- name: Set some SELinux booleans related to spamassassin
|
||||
seboolean: name={{ item }} state=yes persistent=yes
|
||||
with_items:
|
||||
|
@ -18,7 +25,21 @@
|
|||
- 'spamd_update_can_network'
|
||||
|
||||
when: ansible_distribution_file_variety == "RedHat"
|
||||
tags: [ 'spamassassin' ]
|
||||
tags: [ 'spamassassin', 'spamassassin_packages' ]
|
||||
|
||||
- name: Disable the sought rules
|
||||
block:
|
||||
- name: Remove the soughtrules configuration and database files
|
||||
file: dest={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ spamassassin_conf_dir }}/channel.d/sought.conf'
|
||||
- '/var/lib/spamassassin/{{ spamassassin_rules_version }}/sought_rules_yerp_org.cf'
|
||||
- '/var/lib/spamassassin/{{ spamassassin_rules_version }}/sought_rules_yerp_org.cf'
|
||||
- '/var/lib/spamassassin/{{ spamassassin_rules_version }}/sought_rules_yerp_org'
|
||||
notify: Restart spamassassin
|
||||
|
||||
when: not spamassassin_disable_soughtrules
|
||||
tags: [ 'spamassassin', 'spamassassin_conf', 'spamassassin_sought' ]
|
||||
|
||||
- name: Install pyzor from pip
|
||||
block:
|
||||
|
|
|
@ -7,6 +7,14 @@ spamassassin_rh_packages:
|
|||
- spamassassin
|
||||
- spamassassin-iXhash2
|
||||
- python2-pip
|
||||
- perl-Geo-IP
|
||||
- perl-Net-Patricia
|
||||
- gcc
|
||||
|
||||
# via cpanm
|
||||
spamassassin_rh_perl_packages:
|
||||
- 'Razor2::Client::Agent'
|
||||
|
||||
|
||||
spamassassin_sql_rh_packages:
|
||||
- perl-DBD-Pg
|
||||
|
|
Loading…
Reference in New Issue