change redis config

This commit is contained in:
psy 2021-01-29 15:17:16 +01:00
parent b46012bf7a
commit e31ddb9102
No known key found for this signature in database
GPG key ID: DFF5B17AC3A8ECF5
2 changed files with 25 additions and 0 deletions

View file

@ -1,2 +1,13 @@
rspamd: rspamd:
redis: false
local_configs: {} local_configs: {}
rspamd_redis:
local_configs:
redis.conf:
servers: /var/run/redis/redis-rspamd.sock
classifier-bayes.conf:
backend: redis
servers: /var/run/redis/redis-rspamd-bayes.sock
worker-fuzzy.inc:
backend: redis
servers: /var/run/redis/redis-rspamd-fuzzy.sock

View file

@ -1,5 +1,19 @@
- include: install.yml - include: install.yml
- name: use redis
when: rspamd.redis
block:
- name: add redis config to local_configs
set_fact:
rspamd:
local_configs: "{{ {}|combine( rspamd.local_configs, rspamd_redis.local_configs) }}"
- name: add rspamd user to redis group
user:
name: _rspamd
groups: redis
append: true
- name: create local.d config files - name: create local.d config files
template: template:
src: local.d.config.j2 src: local.d.config.j2