First version
This commit is contained in:
parent
759f18def9
commit
025d57b3b9
24
README.md
24
README.md
|
@ -1,3 +1,25 @@
|
||||||
# lxc_rsyslog_no_kernel
|
# lxc_rsyslog_no_kernel
|
||||||
|
|
||||||
No kernel logging in LXContainers
|
No kernel logging in LXContainers
|
||||||
|
|
||||||
|
|
||||||
|
## Example playbook:
|
||||||
|
|
||||||
|
```
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- role: lxc_rsyslog_no_kernel
|
||||||
|
when: ansible_virtualization_role|default('NA') == 'guest' and ansible_virtualization_type|default('NA') == 'lxc'
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
GPL-3.0-or-later
|
||||||
|
|
||||||
|
|
||||||
|
## Author Information
|
||||||
|
|
||||||
|
- Sven Velt <sven-ansiblerole@velt.biz>
|
||||||
|
- https://git.velt.biz/velt.biz/
|
||||||
|
|
||||||
|
|
6
handlers/main.yml
Normal file
6
handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Restart Rsyslog
|
||||||
|
service:
|
||||||
|
name: rsyslog
|
||||||
|
state: restarted
|
||||||
|
|
9
tasks/main.yml
Normal file
9
tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: Disable kernel logging
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/rsyslog.conf
|
||||||
|
regexp: '^\s+#?(.*imklog.)$'
|
||||||
|
line: '#\1'
|
||||||
|
backup: yes
|
||||||
|
notify: Restart Rsyslog
|
||||||
|
|
Loading…
Reference in a new issue