ansible-roles/redis/tasks/default-log2mail.yml
Jérémy Lecour 84bd3372d5
All checks were successful
continuous-integration/drone/push Build is passing
blockinfile: change from "content" to "block"
It solves the diff bug :
https://github.com/ansible/ansible/issues/62315
2020-12-02 15:22:35 +01:00

20 lines
510 B
YAML

---
- name: log2mail config is present
blockinfile:
dest: /etc/log2mail/config/redis.conf
owner: log2mail
group: adm
mode: "0640"
create: yes
marker: "# {mark} ANSIBLE MANAGED RULES FOR DEFAULT INSTANCE"
block: |
file = {{ redis_log_dir }}/redis-server.log
pattern = "Cannot allocate memory"
mailto = {{ log2mail_alert_email or general_alert_email | mandatory }}
template = /etc/log2mail/mail
notify: restart log2mail
tags:
- redis
- log2mail