re-added all files
This commit is contained in:
70
manifests/main/install.pp
Normal file
70
manifests/main/install.pp
Normal file
@@ -0,0 +1,70 @@
|
||||
## cd_nagios::main::install.pp
|
||||
# Module name: cd_nagios
|
||||
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
||||
# # License:
|
||||
# This file is part of cd_nagios.
|
||||
#
|
||||
# cd_nagios is used for providing automatic configuration of Nagios.
|
||||
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# @summary Class manage all aspects of installing binaries required for
|
||||
# cd_nagios
|
||||
###############################################################################
|
||||
class cd_nagios::main::install (
|
||||
|
||||
) inherits cd_nagios::params {
|
||||
|
||||
require cd_resources
|
||||
|
||||
# if our FQDN matches the configured Nagios server FQDN, install both server-
|
||||
# and client packages.
|
||||
|
||||
if $::fqdn == $ng_nagios_server {
|
||||
|
||||
# we'll need httpd installed
|
||||
require cd_apache
|
||||
|
||||
package {$reqpackages_server:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
package {$reqpackages_client:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
|
||||
# install NRPE if enabled
|
||||
|
||||
if $ng_include_nrpe == true {
|
||||
|
||||
package {$reqpackages_nrpe:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# if we are not the nagios server, install client packages
|
||||
|
||||
if $::fqdn != $ng_nagios_server {
|
||||
package {$reqpackages_client:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
|
||||
# if we want o use NRPE, install it
|
||||
|
||||
if $ng_include_nrpe == true {
|
||||
package {$reqpackages_nrpe:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user