From 4a78089ffc35495cb881e5260b034de3d04bda3b Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 31 Dec 2020 14:17:04 +0100 Subject: [PATCH] added role native-journalctl --- roles/native-journalctl/handlers/main.yml | 3 ++ roles/native-journalctl/tasks/main.yml | 3 ++ .../templates/journald.conf.j2 | 47 +++++++++++++++++++ site.yml | 1 + 4 files changed, 54 insertions(+) create mode 100644 roles/native-journalctl/handlers/main.yml create mode 100644 roles/native-journalctl/tasks/main.yml create mode 100644 roles/native-journalctl/templates/journald.conf.j2 diff --git a/roles/native-journalctl/handlers/main.yml b/roles/native-journalctl/handlers/main.yml new file mode 100644 index 00000000..b7faa91c --- /dev/null +++ b/roles/native-journalctl/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: restart systemd-journald + service: name=systemd-journald state=restarted diff --git a/roles/native-journalctl/tasks/main.yml b/roles/native-journalctl/tasks/main.yml new file mode 100644 index 00000000..a078741d --- /dev/null +++ b/roles/native-journalctl/tasks/main.yml @@ -0,0 +1,3 @@ +- name: copy journald.conf + template: src=templates/journald.conf.j2 dest=/etc/systemd/journald.conf + notify: restart systemd-journald diff --git a/roles/native-journalctl/templates/journald.conf.j2 b/roles/native-journalctl/templates/journald.conf.j2 new file mode 100644 index 00000000..5ab2d1c0 --- /dev/null +++ b/roles/native-journalctl/templates/journald.conf.j2 @@ -0,0 +1,47 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# Entries in this file show the compile time defaults. +# You can change settings by editing this file. +# Defaults can be restored by simply deleting this file. +# +# See journald.conf(5) for details. + +[Journal] +#Storage=auto +#Compress=yes +#Seal=yes +#SplitMode=uid +#SyncIntervalSec=5m +#RateLimitIntervalSec=30s +#RateLimitBurst=10000 +#SystemMaxUse= +#SystemKeepFree= +#SystemMaxFileSize= +#SystemMaxFiles=100 +#RuntimeMaxUse= +#RuntimeKeepFree= +#RuntimeMaxFileSize= +#RuntimeMaxFiles=100 + +# Store logs for one week: +MaxRetentionSec=604800 + +#MaxFileSec=1month +#ForwardToSyslog=no +#ForwardToKMsg=no +#ForwardToConsole=no +#ForwardToWall=yes +#TTYPath=/dev/console +#MaxLevelStore=debug +#MaxLevelSyslog=debug +#MaxLevelKMsg=notice +#MaxLevelConsole=info +#MaxLevelWall=emerg +#LineMax=48K +#ReadKMsg=yes +#Audit=yes diff --git a/site.yml b/site.yml index 227e7924..6d80e279 100644 --- a/site.yml +++ b/site.yml @@ -4,6 +4,7 @@ roles: - system-security - system-update + - native-journalctl become: true - name: setup wireguard hosts hosts: wireguard_hosts