Files
confdroid_nagios/manifests/server/service.pp

30 lines
935 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-03-01 14:34:53 +01:00
require confdroid_nagios::nagios::config
2026-02-28 16:16:59 +01:00
2026-03-01 14:21:30 +01:00
exec { 'ng_restart_httpd':
2026-02-14 21:43:49 +01:00
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-03-01 14:21:30 +01:00
require => Exec['ng_restart_httpd'],
2026-02-14 20:10:14 +01:00
}
}
2026-02-10 14:04:06 +01:00
}