From 1893960c1babb6a261cc6fc399231e9c0644a104 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 29 Sep 2009 22:51:15 +0200 Subject: refactor everything into its own file --- manifests/remoteplugin.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 manifests/remoteplugin.pp (limited to 'manifests/remoteplugin.pp') diff --git a/manifests/remoteplugin.pp b/manifests/remoteplugin.pp new file mode 100644 index 0000000..4bca235 --- /dev/null +++ b/manifests/remoteplugin.pp @@ -0,0 +1,18 @@ +define munin::remoteplugin($ensure = "present", $source, $config = '') { + case $ensure { + "absent": { munin::plugin{ $name: ensure => absent } } + default: { + file { + "/var/lib/puppet/modules/munin/plugins/${name}": + source => $source, + mode => 0755, owner => root, group => 0; + } + munin::plugin { $name: + ensure => $ensure, + config => $config, + script_path_in => "/var/lib/puppet/modules/munin/plugins", + } + } + } +} + -- cgit v1.2.3