initial version
This commit is contained in:
44
tasks/main.yml
Normal file
44
tasks/main.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
# tasks file for rspamd
|
||||
- name: configure repo
|
||||
get_url:
|
||||
url: https://rspamd.com/rpm-stable/centos-7/rspamd.repo
|
||||
dest: /etc/yum.repos.d/rspamd.repo
|
||||
|
||||
- name: get repo gpg key
|
||||
rpm_key:
|
||||
key: https://rspamd.com/rpm-stable/gpg.key
|
||||
state: present
|
||||
|
||||
- name: install rspamd
|
||||
yum:
|
||||
state: present
|
||||
name:
|
||||
- rspamd
|
||||
- redis
|
||||
|
||||
- name: ensure rspamd listen everywhere
|
||||
lineinfile:
|
||||
create: true
|
||||
path: /etc/rspamd/local.d/proxy-normal.inc
|
||||
regex: "^bind_socket = localhost:11332"
|
||||
line: "bind_socket = *:11332"
|
||||
notify: restart rspamd
|
||||
|
||||
- name: binding rspamd to redis
|
||||
template:
|
||||
dest: /etc/rspamd/local.d/redis.conf
|
||||
content: |
|
||||
read_servers = "127.0.0.1,10.0.0.1";
|
||||
write_servers = "127.0.0.1";
|
||||
notify: restart rspamd
|
||||
|
||||
- name: start service
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
enabled: true
|
||||
loop:
|
||||
- redis
|
||||
- rspamd
|
||||
|
||||
Reference in New Issue
Block a user