$vserver_vdirbase = "/var/vservers"
include vserver::host
- if $use_nagios != false {
- if $use_nagios_fqdn == true {
- include nagios::target::fqdn
- }
- else {
- include nagios::target
- }
- nagios::service::ping { "$fqdn": }
+ # Monitoring
+ class { 'monitor':
+ type => 'host',
+ use_nagios => extlookup('host_use_nagios', 'true'),
}
# Time configuration
import "subsystems/domain.pp"
import "subsystems/dhclient.pp"
import "subsystems/mount.pp"
+import "subsystems/monitor.pp"
import "subsystems/utils.pp"
import "subsystems/utils/debian.pp"
import "subsystems/utils/desktop.pp"
# personal computer
class nodo::personal {
-
- case $use_nagios {
- '': { $use_nagios = false }
- }
-
include nodo::physical
include utils::personal
include pam
include gdm
}
+ # Monitoring
+ class { 'monitor':
+ type => 'personal',
+ use_nagios => extlookup('personal_use_nagios', 'false'),
+ }
+
# Currently tor management just works for debian
case $operatingsystem {
debian: {
--- /dev/null
+class monitor(
+ $type = 'vserver',
+ $use_nagios = true,
+) {
+
+ if $use_nagios != false {
+
+ if $type == 'vserver' {
+ include nagios::target::fqdn
+ nagios::service::ping { "$fqdn": }
+ }
+
+ if $type == 'host' or $type == 'personal' {
+ if extlookup('use_nagios_fqdn', false) == true {
+ include nagios::target::fqdn
+ }
+ else {
+ include nagios::target
+ }
+ nagios::service::ping { "$fqdn": }
+ }
+
+ }
+
+}
}
# Nagios configuration
- if $use_nagios != false {
- include nagios::target::fqdn
- nagios::service::ping { "$fqdn": }
+ class { 'monitor':
+ type => 'vserver',
+ use_nagios => extlookup('vserver_use_nagios', 'false'),
}
}
}