From 1204730924436ef9e1c7c49c9557837f9a5ed0e8 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Wed, 8 Feb 2023 00:40:09 -0800 Subject: fork https://github.com/mattsta/mailweb --- ansible/roles/rspamd/tasks/main.yml | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 ansible/roles/rspamd/tasks/main.yml (limited to 'ansible/roles/rspamd/tasks') diff --git a/ansible/roles/rspamd/tasks/main.yml b/ansible/roles/rspamd/tasks/main.yml new file mode 100644 index 0000000..a15c330 --- /dev/null +++ b/ansible/roles/rspamd/tasks/main.yml @@ -0,0 +1,54 @@ +--- +# Set Up rspam repo +- name: install rspam key + apt_key: + url: https://rspamd.com/apt-stable/gpg.key + state: present + +- name: create rspam repo + apt_repository: + repo: deb http://rspamd.com/apt-stable/ bionic main + state: present + +# rspamd install and configuration +- name: install shitdis + apt: + pkg: redis + state: latest + +- name: set guanodis directory permissions + file: + path: /var/lib/redis + owner: redis + group: redis + mode: 0700 + state: directory + +- name: copy poodis config + copy: + src: redis/ + dest: /etc/redis/ + notify: + - restart redis + +- name: install rspamd + apt: + pkg: rspamd + state: latest + +- name: copy rspamd config + copy: + src: rspamd/local.d/ + dest: /etc/rspamd/local.d/ + notify: + - restart rspamd + +# verify everything is running +- name: verify services are running in dependency order + service: + name: "{{ item }}" + enabled: yes + state: started + loop: + - redis + - rspamd -- cgit v1.2.3