From 23e3ddf1daa52d46c40d540d25218195997e8524 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 6 Apr 2011 10:44:58 +0200 Subject: try to fix nagios::plugin problem We have a serious problem with the concept that we had up to now if you start adding more than one nagios server. This is an attempt to fix it, with certain drawbacks, such as that you have to list all the nagios plugins in the nagios modules. This will be subject of further discussion. --- manifests/plugin/deploy.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 75f87d7..96fea41 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -10,14 +10,14 @@ define nagios::plugin::deploy($source = '', $ensure = 'present', $config = '', $ } if !defined(Package[$require_package]) { - @@package { $require_package: + package { $require_package: ensure => installed, tag => "nagios::plugin::deploy::package"; } } include nagios::plugin::scriptpaths - @@file { "nagios_plugin_${name}": + file { "nagios_plugin_${name}": path => "$nagios::plugin::scriptpaths::script_path/${name}", source => "puppet://$server/modules/$real_source", mode => 0755, owner => root, group => 0, @@ -26,5 +26,5 @@ define nagios::plugin::deploy($source = '', $ensure = 'present', $config = '', $ } # register the plugin - @@nagios::plugin{$name: ensure => $ensure, require => Package['nagios-plugins'] } + nagios::plugin{$name: ensure => $ensure, require => Package['nagios-plugins'] } } -- cgit v1.2.3 From 0fe7552f256f0b1508cc5d3cab952eb93bee6811 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 19:34:51 -0300 Subject: new style for 2.7 --- manifests/plugin/deploy.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/plugin/deploy.pp') diff --git a/manifests/plugin/deploy.pp b/manifests/plugin/deploy.pp index 96fea41..3f2a1a4 100644 --- a/manifests/plugin/deploy.pp +++ b/manifests/plugin/deploy.pp @@ -5,7 +5,7 @@ define nagios::plugin::deploy($source = '', $ensure = 'present', $config = '', $ default => $ensure } $real_source = $source ? { - '' => "nagios/plugins/$plugin_src", + '' => "nagios/plugins/${plugin_src}", default => $source } @@ -15,11 +15,11 @@ define nagios::plugin::deploy($source = '', $ensure = 'present', $config = '', $ tag => "nagios::plugin::deploy::package"; } } - + include nagios::plugin::scriptpaths file { "nagios_plugin_${name}": path => "$nagios::plugin::scriptpaths::script_path/${name}", - source => "puppet://$server/modules/$real_source", + source => "puppet:///modules/${real_source}", mode => 0755, owner => root, group => 0, require => Package[$require_package], tag => "nagios::plugin::deploy::file"; -- cgit v1.2.3