diff options
Diffstat (limited to 'manifests/defaults')
-rw-r--r-- | manifests/defaults/templates.pp | 3 | ||||
-rw-r--r-- | manifests/defaults/vars.pp | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/manifests/defaults/templates.pp b/manifests/defaults/templates.pp index 752ba60..bf8a6cf 100644 --- a/manifests/defaults/templates.pp +++ b/manifests/defaults/templates.pp @@ -1,7 +1,8 @@ class nagios::defaults::templates { + include nagios::defaults::vars file { 'nagios_templates': - path => "${nagios_cfgdir}/conf.d/nagios_templates.cfg", + path => "${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_templates.cfg", source => [ "puppet://$server/modules/site-nagios/configs/${fqdn}/nagios_templates.cfg", "puppet://$server/modules/site-nagios/configs/${operatingsystem}/nagios_templates.cfg", "puppet://$server/modules/site-nagios/configs/nagios_templates.cfg", diff --git a/manifests/defaults/vars.pp b/manifests/defaults/vars.pp new file mode 100644 index 0000000..6302f13 --- /dev/null +++ b/manifests/defaults/vars.pp @@ -0,0 +1,10 @@ +class nagios::defaults::vars { + case $nagios_cfgdir { + '': { $int_nagios_cfgdir = $operatingsystem ? { + centos => '/etc/nagios/', + default => '/etc/nagios3' + } + } + default: { $int_nagios_cfgdir = $nagios_cfgdir } + } +} |