From 2ee46c9a31a56110a38d5a076af84448643bd85b Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 2 Oct 2015 18:26:45 -0400 Subject: files managed for apache on debian break usage through main class Currently the nagios::apache class manages some files for debian. This means that when using the main class for setting up nagios with apache (which is the default!) lacks those files and the setup doesn't work. Split out management of those files into another class to avoid making the code in the main class too encumbered and make the main class include that (instead of nagios::apache). nagios::apache will include the main class anyway. Adjust README file so that all cases of http management are done through the "nagios" class. --- manifests/apache.pp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'manifests/apache.pp') diff --git a/manifests/apache.pp b/manifests/apache.pp index b89ff5d..1e4224e 100644 --- a/manifests/apache.pp +++ b/manifests/apache.pp @@ -4,26 +4,9 @@ class nagios::apache( $manage_munin = false ) { class{'nagios': - httpd => 'apache', + httpd => 'apache', allow_external_cmd => $allow_external_cmd, - manage_munin => $manage_munin, - manage_shorewall => $manage_shorewall, - } - - case $::operatingsystem { - 'debian': { - file { "${nagios::defaults::vars::int_cfgdir}/apache2.conf": - ensure => present, - source => [ "puppet:///modules/site_nagios/configs/${::fqdn}/apache2.conf", - "puppet:///modules/site_nagios/configs/apache2.conf", - "puppet:///modules/nagios/configs/apache2.conf"], - } - - apache::config::global { "nagios3.conf": - ensure => link, - target => "${nagios::defaults::vars::int_cfgdir}/apache2.conf", - require => File["${nagios::defaults::vars::int_cfgdir}/apache2.conf"], - } - } + manage_munin => $manage_munin, + manage_shorewall => $manage_shorewall, } } -- cgit v1.2.3