diff options
author | Aaron LI <aly@aaronly.me> | 2018-12-20 14:10:52 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-12-20 14:15:16 +0800 |
commit | af3fb2050339eb304289d618255b33488246db7d (patch) | |
tree | 84111ec7ff12cfca770445501b349ab407245510 | |
parent | 4be8b0ad59f1575a1cc4e794f91bc2b9a3eff09b (diff) | |
download | ansible-dfly-vps-af3fb2050339eb304289d618255b33488246db7d.tar.bz2 |
basic: Enable all.log and tweak syslogd flags
-rw-r--r-- | roles/basic/tasks/main.yml | 23 |
1 files changed, 23 insertions, 0 deletions
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: |