From 822a0a8fd6a066bf9a054439c893a73bd28f21d5 Mon Sep 17 00:00:00 2001 From: Kjetil Torgrim Homme Date: Thu, 9 Nov 2017 15:26:09 +0100 Subject: [PATCH 1/2] fix two spurious puppet-lint complaints, disable abort on warning for the future. --- Rakefile | 2 +- manifests/master/node_definition.pp | 2 +- manifests/node/export.pp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index fcfda3a..aec8e82 100644 --- a/Rakefile +++ b/Rakefile @@ -34,7 +34,7 @@ PuppetLint.configuration.relative = true PuppetLint.configuration.disable_80chars PuppetLint.configuration.disable_class_inherits_from_params_class PuppetLint.configuration.disable_class_parameter_defaults -PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.fail_on_warnings = false PuppetLint::RakeTask.new :lint do |config| config.ignore_paths = exclude_paths diff --git a/manifests/master/node_definition.pp b/manifests/master/node_definition.pp index ea6c50e..088fa0f 100644 --- a/manifests/master/node_definition.pp +++ b/manifests/master/node_definition.pp @@ -24,7 +24,7 @@ ) { - include munin::params::master + include ::munin::params::master $config_root = $munin::params::master::config_root diff --git a/manifests/node/export.pp b/manifests/node/export.pp index c9c9894..f0c7ce0 100644 --- a/manifests/node/export.pp +++ b/manifests/node/export.pp @@ -16,8 +16,8 @@ tag => "munin::master::${mastername}", } @@munin::master::node_definition{ $fqn: - address => $address, - config => $masterconfig, + address => $address, + config => $masterconfig, } if ! empty($node_definitions) { create_resources('@@munin::master::node_definition', $node_definitions) From 081a5d47e891428788f194e58c7feb6d66a46ac8 Mon Sep 17 00:00:00 2001 From: Kjetil Torgrim Homme Date: Thu, 9 Nov 2017 15:31:55 +0100 Subject: [PATCH 2/2] Puppet 4 is strict about non-existing variables, always set $plugin_target when it is used --- manifests/plugin.pp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 1b5b66e..091385e 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -32,13 +32,10 @@ validate_re($ensure, '^(|link|present|absent)$') case $ensure { - 'present': { + 'present', 'absent': { $handle_plugin = true - $plugin_ensure = 'present' - } - 'absent': { - $handle_plugin = true - $plugin_ensure = 'absent' + $plugin_ensure = $ensure + $plugin_target = undef } 'link': { $handle_plugin = true