Files
confdroid_nagios/manifests/server/service.pp

31 lines
998 B
ObjectPascal
Raw Normal View History

2026-02-10 14:04:06 +01:00
## confdroid_nagios::server::service.pp
# Module name: confdroid_nagios
# Author: 12ww1160 (12ww1160@confdroid.com)
2026-02-13 19:29:23 +01:00
# @summary Class manages services for the confdroid_nagios module.
2026-02-10 14:04:06 +01:00
###############################################################################
class confdroid_nagios::server::service (
) inherits confdroid_nagios::params {
2026-02-13 14:57:03 +01:00
require confdroid_nagios::server::files
2026-02-14 20:10:14 +01:00
if $ng_nagios_server == $fqdn {
2026-02-14 21:23:22 +01:00
require confdroid_nagios::server::access_rules
2026-02-28 16:59:27 +01:00
require confdroid_nagios::nagios::resources::resource
require confdroid_nagios::nagios::objects::commands
2026-02-28 16:16:59 +01:00
2026-02-14 21:43:49 +01:00
exec { 'restart_httpd':
command => 'systemctl restart httpd',
2026-02-14 20:36:59 +01:00
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
refreshonly => true,
}
2026-02-14 20:10:14 +01:00
service { $ng_nagios_service:
ensure => running,
name => $ng_nagios_service,
enable => true,
hasrestart => true,
hasstatus => true,
2026-02-14 21:43:49 +01:00
require => Exec['restart_httpd'],
2026-02-14 20:10:14 +01:00
}
}
2026-02-10 14:04:06 +01:00
}