From af3fb2050339eb304289d618255b33488246db7d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 20 Dec 2018 14:10:52 +0800 Subject: basic: Enable all.log and tweak syslogd flags --- roles/basic/tasks/main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/roles/basic/tasks/main.yml b/roles/basic/tasks/main.yml index 324ca9f..f707e42 100644 --- a/roles/basic/tasks/main.yml +++ b/roles/basic/tasks/main.yml @@ -21,17 +21,40 @@ hint.ehci.0.disabled=1 hint.ahci.disabled=1 +- name: syslog - tweak daemon flags + lineinfile: + path: /etc/rc.conf + regexp: '^#?\s*syslogd_flags' + line: 'syslogd_flags="-ss -vv"' + tags: syslog + - name: syslog - enable console log file (1/2) lineinfile: path: /etc/syslog.conf regexp: '^#?\s*console.info' line: "console.info /var/log/console.log" + tags: syslog - name: syslog - enable console log file (2/2) file: path: /var/log/console.log state: touch mode: 0600 + tags: syslog + +- name: syslog - enable all log file (1/2) + lineinfile: + path: /etc/syslog.conf + regexp: '^#?\s*\*\.\*\s*/var/log/all.log' + line: "*.* /var/log/all.log" + tags: syslog + +- name: syslog - enable all log file (2/2) + file: + path: /var/log/all.log + state: touch + mode: 0600 + tags: syslog - name: periodic - touch config file file: -- cgit v1.2.2