OP#421 add main structure
This commit is contained in:
10
manifests/client/target.pp
Normal file
10
manifests/client/target.pp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
## confdroid_nagios::client::target.pp
|
||||||
|
# Module name: confdroid_nagios
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_nagios::client::target (
|
||||||
|
|
||||||
|
) inherits confdroid_nagios::params {
|
||||||
|
# Manage target configuration here
|
||||||
|
}
|
||||||
0
manifests/firewall/iptables.pp
Normal file
0
manifests/firewall/iptables.pp
Normal file
@@ -6,5 +6,12 @@
|
|||||||
class confdroid_nagios::main::config (
|
class confdroid_nagios::main::config (
|
||||||
|
|
||||||
) inherits confdroid_nagios::params {
|
) inherits confdroid_nagios::params {
|
||||||
# Manage main configuration here
|
if $ng_nagios_server == $fqdn {
|
||||||
|
include confdroid_nagios::server::service
|
||||||
|
#config here
|
||||||
|
}
|
||||||
|
|
||||||
|
if $ng_nagios_client != $fqdn {
|
||||||
|
include confdroid_nagios::client::targe
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
manifests/main/dirs.pp
Normal file
13
manifests/main/dirs.pp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## confdroid_nagios::main::dirs.pp
|
||||||
|
# Module name: confdroid_nagios
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_nagios::main::dirs (
|
||||||
|
|
||||||
|
) inherits confdroid_nagios::params {
|
||||||
|
if $ng_nagios_server == $fqdn {
|
||||||
|
require confdroid_nagios::main::user
|
||||||
|
#config here
|
||||||
|
}
|
||||||
|
}
|
||||||
12
manifests/main/install.pp
Normal file
12
manifests/main/install.pp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
## confdroid_nagios::main::install.pp
|
||||||
|
# Module name: confdroid_nagios
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_nagios::main::install (
|
||||||
|
|
||||||
|
) inherits confdroid_nagios::params {
|
||||||
|
if $ng_nagios_server == $fqdn {
|
||||||
|
#config here
|
||||||
|
}
|
||||||
|
}
|
||||||
13
manifests/main/user.pp
Normal file
13
manifests/main/user.pp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## confdroid_nagios::main::user.pp
|
||||||
|
# Module name: confdroid_nagios
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_nagios::main::user (
|
||||||
|
|
||||||
|
) inherits confdroid_nagios::params {
|
||||||
|
if $ng_nagios_server == $fqdn {
|
||||||
|
require confdroid_nagios::main::install
|
||||||
|
#config here
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,9 +3,16 @@
|
|||||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
# @summary Class holds all parameters for the confdroid_nagios module and is
|
# @summary Class holds all parameters for the confdroid_nagios module and is
|
||||||
# inherited by all classes except defines.
|
# inherited by all classes except defines.
|
||||||
|
# @param [String] ng_nagios_server The hostname or IP address of the
|
||||||
|
# Nagios server. This will determine the installation selection and the
|
||||||
|
# of the clients to connect to the Nagios server.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class confdroid_nagios::params (
|
class confdroid_nagios::params (
|
||||||
|
|
||||||
|
# main
|
||||||
|
String $ng_nagios_server = 'nagios.example.net',
|
||||||
|
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# Default facts
|
# Default facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|||||||
13
manifests/server/files.pp
Normal file
13
manifests/server/files.pp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## confdroid_nagios::server::files.pp
|
||||||
|
# Module name: confdroid_nagios
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_nagios::server::files (
|
||||||
|
|
||||||
|
) inherits confdroid_nagios::params {
|
||||||
|
if $ng_nagios_server == $fqdn {
|
||||||
|
require confdroid_nagios::main::dirs
|
||||||
|
#config here
|
||||||
|
}
|
||||||
|
}
|
||||||
13
manifests/server/service.pp
Normal file
13
manifests/server/service.pp
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
## confdroid_nagios::server::service.pp
|
||||||
|
# Module name: confdroid_nagios
|
||||||
|
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||||
|
# @summary Class manaages main configuration for the confdroid_nagios module.
|
||||||
|
###############################################################################
|
||||||
|
class confdroid_nagios::server::service (
|
||||||
|
|
||||||
|
) inherits confdroid_nagios::params {
|
||||||
|
if $ng_nagios_server == $fqdn {
|
||||||
|
require confdroid_nagios::server::files
|
||||||
|
#config here
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user