initial version

This commit is contained in:
2025-05-02 11:16:04 +02:00
commit 004ade6aa1
9 changed files with 184 additions and 0 deletions

44
tasks/main.yml Normal file
View 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