forked from evolix/ansible-roles
Merge remote-tracking branch 'origin/T47076' into unstable
This commit is contained in:
commit
e510c44a4a
22
redis/tasks/log2mail.yml
Normal file
22
redis/tasks/log2mail.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: Is log2mail present ?
|
||||||
|
stat:
|
||||||
|
path: /etc/log2mail/config
|
||||||
|
check_mode: no
|
||||||
|
register: log2mail_config_dir
|
||||||
|
tags:
|
||||||
|
- redis
|
||||||
|
- log2mail
|
||||||
|
|
||||||
|
- name: Copy log2mail config
|
||||||
|
template:
|
||||||
|
src: log2mail.j2
|
||||||
|
dest: /etc/log2mail/config/redis.conf
|
||||||
|
owner: log2mail
|
||||||
|
group: adm
|
||||||
|
mode: "0640"
|
||||||
|
when: log2mail_config_dir.stat.exists
|
||||||
|
tags:
|
||||||
|
- redis
|
||||||
|
- log2mail
|
4
redis/templates/log2mail.j2
Normal file
4
redis/templates/log2mail.j2
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
file = /var/log/redis/redis-server.log
|
||||||
|
pattern = "Can't save in background: fork: Cannot allocate memory"
|
||||||
|
mailto = {{ log2mail_alert_email or general_alert_email | mandatory }}
|
||||||
|
template = /etc/log2mail/mail
|
Loading…
Reference in a new issue