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/init.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index c62c480..4c68961 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,7 +24,12 @@ class nagios( case $nagios::httpd { 'absent': { } 'lighttpd': { include ::lighttpd } - 'apache': { include ::apache } + 'apache': { + include ::apache + if $::operatingsystem == 'debian' { + include nagios::debian::apache + } + } default: { include ::apache } } case $::operatingsystem { -- cgit v1.2.3 From 93a00004cfea3e8a4c85d1bbdaaaac5e5ced118f Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 2 Oct 2015 18:37:04 -0400 Subject: lint init.pp one line is too long, break the code block into multiple lines to fix this issue. it also creates more breathing space and makes the code easier to read. --- manifests/init.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests/init.pp') diff --git a/manifests/init.pp b/manifests/init.pp index 4c68961..c800637 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -41,7 +41,9 @@ class nagios( $cfgdir = '/etc/nagios3' include nagios::debian } - default: { fail("No such operatingsystem: ${::operatingsystem} yet defined") } + default: { + fail("No such operatingsystem: ${::operatingsystem} yet defined") + } } if $manage_munin { include nagios::munin -- cgit v1.2.3