From: Héctor Orón Martínez Date: Wed, 31 Jan 2018 15:16:13 +0000 (+0100) Subject: godard: enable persistent journald storage. rt#7049 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=b2fc3cd4df85fc3503b8fb66e3e2d5d6abf76875 godard: enable persistent journald storage. rt#7049 Signed-off-by: Héctor Orón Martínez --- diff --git a/modules/systemd/files/persistency.conf b/modules/systemd/files/persistency.conf new file mode 100644 index 000000000..efd0286ef --- /dev/null +++ b/modules/systemd/files/persistency.conf @@ -0,0 +1,7 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +[Journal] +Storage=persistent diff --git a/modules/systemd/manifests/init.pp b/modules/systemd/manifests/init.pp index d19de1279..08f10fc50 100644 --- a/modules/systemd/manifests/init.pp +++ b/modules/systemd/manifests/init.pp @@ -5,4 +5,17 @@ class systemd { systemd::mask { 'sys-kernel-debug-tracing.mount': } systemd::mask { 'sys-kernel-debug.mount': } + + if $::hostname == 'godard' { + exec {'mkdir -p /etc/systemd/journald.conf.d': + unless => 'test -d /etc/systemd/journald.conf.d', + } + file { '/etc/systemd/journald.conf.d/persistency.conf': + source => 'puppet:///modules/systemd/persistency.conf', + } + exec {'systemctl force-reload systemd-journald': + refreshonly => true + } + } + }