2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Fix rsyslog behaviour on some ubuntu machines disabling the kernel logger
|
|
|
|
lineinfile: dest=/etc/rsyslog.conf regexp="\\$ModLoad\ imklog" line="#$ModLoad imklog" backup=yes
|
|
|
|
when:
|
|
|
|
- is_precise and ansible_kernel != "3.2.0-4-amd64"
|
|
|
|
- is_not_trusty
|
2016-10-13 19:59:54 +02:00
|
|
|
notify: Restart rsyslog
|
|
|
|
tags: rsyslog
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2016-10-24 15:33:10 +02:00
|
|
|
- name: Enable the kernel logger on ubuntu >= 12.04 and kernel major version >= 3
|
|
|
|
lineinfile: dest=/etc/rsyslog.conf line="$ModLoad imklog " insertafter="\\$ModLoad\ imuxsock" backup=yes
|
2015-05-28 11:32:57 +02:00
|
|
|
when:
|
|
|
|
- is_precise and ansible_kernel == "3.2.0-4-amd64"
|
|
|
|
- is_trusty
|
2016-10-13 19:59:54 +02:00
|
|
|
notify: Restart rsyslog
|
|
|
|
tags: rsyslog
|
|
|
|
|
|
|
|
- name: Install custom rsyslog rules
|
|
|
|
template: src=10-custom_rules.conf.j2 dest=/etc/rsyslog.d/10-custom_rules.conf owner=root group=root mode=0444
|
|
|
|
when: default_rsyslog_custom_rules is defined
|
|
|
|
notify: Restart rsyslog
|
|
|
|
tags: rsyslog
|
|
|
|
|