From 47c5d323099b341a785b44f9d05ff0b535ce12e6 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Fri, 14 Feb 2014 16:08:40 +0100 Subject: Allow to deploy a plugin without registering it --- manifests/plugin/deploy.pp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index c514eed..2cee966 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -3,7 +3,8 @@ define munin::plugin::deploy( $ensure = 'present', $source = '', $config = '', - $seltype = 'munin_exec_t' + $seltype = 'munin_exec_t', + $register = true, ) { $plugin_src = $ensure ? { 'present' => $name, @@ -36,9 +37,12 @@ define munin::plugin::deploy( File["munin_plugin_${name}"]{ require => $basic_require, } - # register the plugin - munin::plugin{$name: - ensure => $ensure, - config => $config + + # register the plugin if required + if ($register) { + munin::plugin{$name: + ensure => $ensure, + config => $config + } } } -- cgit v1.2.3