OP#421 add main structure

This commit is contained in:
12ww1160
2026-02-10 14:04:06 +01:00
parent bdbfdf457d
commit 5c29c078ad
9 changed files with 89 additions and 1 deletions

View 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
}

View File

View File

@@ -6,5 +6,12 @@
class confdroid_nagios::main::config (
) 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
View 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
View 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
View 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
}
}

View File

@@ -3,9 +3,16 @@
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class holds all parameters for the confdroid_nagios module and is
# 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 (
# main
String $ng_nagios_server = 'nagios.example.net',
) {
# Default facts
$fqdn = $facts['networking']['fqdn']

13
manifests/server/files.pp Normal file
View 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
}
}

View 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
}
}