diff --git a/manifests/config.pp b/manifests/config.pp index 2420b00..5bbc1be 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -18,10 +18,13 @@ group => 'systemd-journal', } - file { '/etc/systemd/journald.conf': - ensure => 'file', - owner => 0, - group => 0, - content => template("${module_name}/journald.conf.erb"), + $defaults = { + 'path' => '/etc/systemd/journald.conf', + 'notify' => Service['systemd-journald'], } + + $ini_settings = { + 'Journal' => $merged_options, + } + create_ini_settings($ini_settings, $defaults) } diff --git a/manifests/init.pp b/manifests/init.pp index 6f6b288..47a3e6e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,9 +4,9 @@ # # === Parameters: # -# $persist_log:: By default, the journal stores log data in /run/log/journal/. +# $persist_log:: By default, the journal stores log data in /run/log/journal/. # Since /run/ is volatile, log data is lost at reboot. To make the -# data persistent, it is sufficient to create /var/log/journal/ +# data persistent, it is sufficient to create /var/log/journal/ # where systemd-journald will then store the data. # # $enable_defaults:: if defaults parameters should be used or not @@ -18,11 +18,11 @@ $enable_defaults = $journald::params::enable_defaults, $options = {}, ) inherits journald::params { - if $::osfamily == 'RedHat' and versioncmp($::operatingsystemrelease, '7.0') >= 0 { - contain ::journald::config - contain ::journald::service - Class['journald::config'] ~> - Class['journald::service'] - } + contain ::journald::config + contain ::journald::service + + Class['journald::config'] ~> + Class['journald::service'] + } diff --git a/templates/journald.conf.erb b/templates/journald.conf.erb deleted file mode 100644 index 1a347d0..0000000 --- a/templates/journald.conf.erb +++ /dev/null @@ -1,9 +0,0 @@ -## file generated by puppet -# See journald.conf(5) for details - -[Journal] -<%- scope['journald::config::merged_options'].sort.each do |k, v| -%> -<%- if v != :undef -%> -<%= k %>=<%= v %> -<%- end -%> -<%- end -%>