1 - name: install mailman
2 apt: name=mailman state=latest
3 - name: configure mailman
5 dest: /etc/mailman/mm_cfg.py
6 src: templates/mm_cfg.py
8 - name: install mailman-check cronjob
10 dest: /etc/cron.daily/mailman-check
11 src: files/mailman-check
13 # the CAPTCHA patch (and some template modifications)
14 - name: check if the files are already patched
15 shell: 'fgrep MAILMAN_CAPTCHA_PATCHED Cgi/listinfo.py && fgrep MAILMAN_CAPTCHA_PATCHED Cgi/subscribe.py'
17 chdir: /usr/lib/mailman/Mailman
19 failed_when: mailman_patched.rc == 2
20 register: mailman_patched
21 - name: check if all the files have the right checksums to be patched
22 shell: 'echo "{{item}}" | sha256sum -c'
24 - "26b4cbb7c5bde8badf741e31975235e74abb932037d77d862cf00b412726c2c2 /usr/lib/mailman/Mailman/Cgi/listinfo.py"
25 - "cbef3d8cb6b65e4c9b2462f8627966d55dd52caa2e626c87241c4f8d47477dc7 /usr/lib/mailman/Mailman/Cgi/subscribe.py"
27 when: mailman_patched.rc != 0
28 - name: install patched python files
30 dest: /usr/lib/mailman/Mailman/{{item}}
31 src: files/mailman-patched/{{item}}
36 - name: install patched templates
38 dest: /etc/mailman/{{item}}
39 src: files/mailman-patched/{{item}}