Files
ansible_rspamd/tasks/main.yml
2025-05-02 11:16:04 +02:00

45 lines
907 B
YAML

---
# 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