diff options
author | Leap devs <sysdev@leap.se> | 2012-09-19 16:29:34 +0000 |
---|---|---|
committer | Leap devs <sysdev@leap.se> | 2012-09-19 16:29:34 +0000 |
commit | eafb4c73ee82915bf83eac01bb26265c531a68e2 (patch) | |
tree | cc43c64a64eed30c601a1aaa04e0521beca43a75 /manifests/init.pp | |
parent | 66257f3c425fea5fcea2acb999854aae5e7cf9f1 (diff) | |
parent | 41fe95b36253826b8f801ee1669acdb28c70076c (diff) |
Merge branch 'immerda'
Conflicts:
manifests/apache.pp
manifests/irc_bot.pp
manifests/service/mysql.pp
templates/irc_bot/nsa.cfg.erb
Conflict resolutions:
apache.pp: just cosmetics
mysql.pp: The shared modules provides more variables to fine tune the mysql health
check so we went for this version.
The irc bot conflicts were a result of immerda's branch not being
up-to-date with the shared branch. The shared branch had
factored out the irc_bot.pp into a directory, and added a few
additional variables. Immerda changed the variables from having
the prefix $nagios_ to not having it and did not have that
refactor. The variable renames were good ones for the 2.7
refactoring work, and future hiera integration, so we want those.
So to resolve this, we took the shared version of the refactor,
and then took the immerda version of the variable renames. This
requires an UPGRADE NOTICE in the README as people may have been
using the previous variable names.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 1aecc3a..12d3db2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,28 +8,36 @@ # Marcel Härry haerry+puppet(at)puzzle.ch # Simon Josi josi+puppet(at)puzzle.ch # -# This program is free software; you can redistribute -# it and/or modify it under the terms of the GNU -# General Public License version 3 as published by +# This program is free software; you can redistribute +# it and/or modify it under the terms of the GNU +# General Public License version 3 as published by # the Free Software Foundation. # -class nagios { - case $nagios_httpd { - 'absent': { } - 'lighttpd': { include lighttpd } - 'apache': { include apache } - default: { include apache } +class nagios( + $httpd = 'apache', + $allow_external_cmd = false, + $manage_shorewall = false, + $manage_munin = false +) { + case $nagios::httpd { + 'absent': { } + 'lighttpd': { include ::lighttpd } + 'apache': { include ::apache } + default: { include ::apache } + } + case $::operatingsystem { + 'centos': { + $cfgdir = '/etc/nagios' + include nagios::centos } - case $operatingsystem { - 'centos': { - $nagios_cfgdir = '/etc/nagios' - include nagios::centos - } - 'debian': { - $nagios_cfgdir = '/etc/nagios3' - include nagios::debian - } - default: { fail("No such operatingsystem: $operatingsystem yet defined") } + 'debian': { + $cfgdir = '/etc/nagios3' + include nagios::debian } + default: { fail("No such operatingsystem: ${::operatingsystem} yet defined") } + } + if $manage_munin { + include nagios::munin + } } |