From b74b2d6bb30ac4b3b688dc6e82730b78943ae001 Mon Sep 17 00:00:00 2001 From: Cristian Falcas Date: Fri, 19 May 2017 12:00:05 +0300 Subject: [PATCH] fix default for default params. Fix template for empty options --- manifests/init.pp | 2 +- manifests/params.pp | 2 +- metadata.json | 2 +- templates/journald.conf.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 4c8944f..6f6b288 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,7 +16,7 @@ class journald ( $persist_log = $journald::params::persist_log, $enable_defaults = $journald::params::enable_defaults, - $options = undef + $options = {}, ) inherits journald::params { if $::osfamily == 'RedHat' and versioncmp($::operatingsystemrelease, '7.0') >= 0 { contain ::journald::config diff --git a/manifests/params.pp b/manifests/params.pp index 1b32fdd..b816f23 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,6 @@ class journald::params { $persist_log = true - $enable_defaults = false + $enable_defaults = true $default_options = { 'Storage' => 'auto', 'Compress' => 'yes', diff --git a/metadata.json b/metadata.json index 8d7a922..9b7cae5 100644 --- a/metadata.json +++ b/metadata.json @@ -1,7 +1,7 @@ { "name": "cristifalcas-journald", "author": "Cristian Falcas", - "version": "0.4.0", + "version": "0.5.0", "source": "git@github.com:cristifalcas/puppet-journald.git", "project_page": "https://github.com/cristifalcas/puppet-journald", "issues_url": "https://github.com/cristifalcas/puppet-journald/issues", diff --git a/templates/journald.conf.erb b/templates/journald.conf.erb index 250fc2b..1a347d0 100644 --- a/templates/journald.conf.erb +++ b/templates/journald.conf.erb @@ -2,7 +2,7 @@ # See journald.conf(5) for details [Journal] -<%- scope.lookupvar('journald::config::merged_options').sort.each do |k, v| -%> +<%- scope['journald::config::merged_options'].sort.each do |k, v| -%> <%- if v != :undef -%> <%= k %>=<%= v %> <%- end -%>