1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- ---
- # Installs and configures the Rspamd spam filtering system.
-
- - name: Ensure repository key for Rspamd is in place
- apt_key: url=https://rspamd.com/apt-stable/gpg.key state=present
- when: ansible_architecture != "armv7l"
- tags:
- - dependencies
-
- - name: Ensure yunohost repository key for Rspamd is in place for ARM
- apt_key: url=http://repo.yunohost.org/debian/yunohost.asc state=present
- when: ansible_architecture == "armv7l"
- tags:
- - dependencies
-
- - name: Add Rspamd repository
- apt_repository: repo="deb https://rspamd.com/apt-stable/ {{ ansible_distribution_release }} main"
- when: ansible_architecture != "armv7l"
- tags:
- - dependencies
-
- - name: Add yunohost Rspamd repository for ARM
- apt_repository: repo="deb http://repo.yunohost.org/debian {{ ansible_distribution_release }} stable"
- when: ansible_architecture == "armv7l"
- tags:
- - dependencies
-
- - name: Install Rspamd, Rmilter, and Redis
- apt: pkg={{ item }} state=installed update_cache=yes
- with_items:
- - rspamd
- - rmilter
- - redis-server
- tags:
- - dependencies
-
- - name: Configure rmilter.common
- copy: src=etc_rmilter.conf.common dest=/etc/rmilter.conf.common
-
- - name: Configure rmilter socket
- lineinfile: dest=/etc/rmilter.conf regexp=^bind_socket line="bind_socket = inet:9900@localhost;"
-
- - name: Configure rmilter service
- copy: src=lib_systemd_system_rmilter.socket dest=/lib/systemd/system/rmilter.socket
-
- - name: Start redis
- service: name=redis-server state=started
-
- - name: Start rspamd systemd listener
- service: name=rspamd state=started
-
- - name: Start rmilter systemd listener
- service: name=rmilter state=started
|