--- - name: Install rspamd package: state: latest name: - rspamd - redis - name: rspamd - start and enable redis on boot systemd: name: redis enabled: yes state: started - name: rspamd - create config folder notify: restart rspamd file: path: /etc/rspamd/local.d state: directory - name: rspamd - config notify: restart rspamd template: src: "rspamd/{{ item }}" dest: "/etc/rspamd/local.d/{{ item }}" with_items: - arc.conf - classifier-bayes.conf - dkim_signing.conf - milter_headers.conf - redis.conf - name: rspamd - set webui password notify: restart rspamd when: mailserver_rspamd_webui_password is defined template: src: rspamd/worker-controller.inc dest: /etc/rspamd/local.d/worker-controller.inc - name: rspamd - install sieve copy: src: "rspamd/{{ item }}" dest: "/srv/mail/sieve/{{ item }}" with_items: - learn-ham.sieve - learn-spam.sieve - name: rspamd - nginx local notify: reload nginx when: mailserver_rspamd_domain == "" template: src: rspamd-local.nginx dest: /etc/nginx/local.d/rspamd.act - name: rspamd - start and enable on boot systemd: name: rspamd enabled: yes state: started