summaryrefslogtreecommitdiff
path: root/manifests/defaults
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2014-10-05 12:36:29 +0200
committermh <mh@immerda.ch>2014-10-05 12:36:29 +0200
commitb52d91b8fcabf0c6b1cd648cf996b7468be60969 (patch)
tree921d17303860ed9e9b7d6f1847b90a04e55ebb7c /manifests/defaults
parentb1a10d01e4c4682540eab75541845514ea8c4dd0 (diff)
get auto purging working again
That purging resources work correctly, the config files must be at the location that the nagios providers have internally, which is at /etc/nagios/<name>.cfg To ease the config file we used the cfg_dir option so far, which we can't anymore and hence this change requires adoption of your site modules. But auto-purging resources will then finally work.
Diffstat (limited to 'manifests/defaults')
-rw-r--r--manifests/defaults/templates.pp15
-rw-r--r--manifests/defaults/vars.pp3
2 files changed, 11 insertions, 7 deletions
diff --git a/manifests/defaults/templates.pp b/manifests/defaults/templates.pp
index 9711dd4..5158189 100644
--- a/manifests/defaults/templates.pp
+++ b/manifests/defaults/templates.pp
@@ -1,14 +1,17 @@
+# manage nagios_templates
class nagios::defaults::templates {
include nagios::defaults::vars
file { 'nagios_templates':
- path => "${nagios::defaults::vars::int_cfgdir}/conf.d/nagios_templates.cfg",
- source => [ "puppet:///modules/site_nagios/configs/${::fqdn}/nagios_templates.cfg",
+ path => "${nagios::defaults::vars::int_cfgdir}/nagios_templates.cfg",
+ source => [ "puppet:///modules/site_nagios/configs/${::fqdn}/nagios_templates.cfg",
"puppet:///modules/site_nagios/configs/${::operatingsystem}/nagios_templates.cfg",
- "puppet:///modules/site_nagios/configs/nagios_templates.cfg",
+ 'puppet:///modules/site_nagios/configs/nagios_templates.cfg',
"puppet:///modules/nagios/configs/${::operatingsystem}/nagios_templates.cfg",
- "puppet:///modules/nagios/configs/nagios_templates.cfg" ],
- notify => Service['nagios'],
- mode => 0644, owner => root, group => root;
+ 'puppet:///modules/nagios/configs/nagios_templates.cfg' ],
+ notify => Service['nagios'],
+ owner => root,
+ group => root,
+ mode => '0644';
}
}
diff --git a/manifests/defaults/vars.pp b/manifests/defaults/vars.pp
index 87f41f8..e1a6224 100644
--- a/manifests/defaults/vars.pp
+++ b/manifests/defaults/vars.pp
@@ -1,7 +1,8 @@
+# some default vars
class nagios::defaults::vars {
case $nagios::cfgdir {
'': { $int_cfgdir = $::operatingsystem ? {
- centos => '/etc/nagios/',
+ centos => '/etc/nagios',
default => '/etc/nagios3'
}
}