1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- - name: Install dspam and related packages on wheezy
- apt: pkg={{ item }} state=installed default_release=wheezy-backports
- with_items:
- - dovecot-antispam
- - dovecot-sieve
- - dspam
- - postfix-pcre
- when: ansible_distribution_release == 'wheezy'
- tags:
- - dependencies
-
- - name: Install dspam and related packages on distributions other than wheezy
- apt: pkg={{ item }} state=installed
- with_items:
- - dovecot-antispam
- - dovecot-sieve
- - dspam
- - postfix-pcre
- when: ansible_distribution_release != 'wheezy'
- tags:
- - dependencies
-
- - name: Create dspam directory
- file: state=directory path=/decrypted/dspam group=dspam owner=dspam
-
- - name: Put dspam configuration files in place
- copy: src=etc_dspam_{{ item }} dest=/etc/dspam/{{ item }} owner=dspam group=dspam
- with_items:
- - default.prefs
- - dspam.conf
- notify:
- - restart postfix
- - restart dovecot
-
- - name: Put dspam postfix configuration in place
- copy: src=etc_postfix_dspam_filter_access dest=/etc/postfix/dspam_filter_access owner=root group=root
- notify: restart postfix
-
- - name: Put dspam dovecot configuration in place
- copy: src=etc_dovecot_conf.d_{{ item }} dest=/etc/dovecot/conf.d/{{ item }} owner=vmail group=dovecot
- with_items:
- - 20-imap.conf
- - 90-plugin.conf
- notify: restart dovecot
|