Files
confdroid_nagios/manifests/server/service.pp
2026-03-01 14:34:53 +01:00

30 lines
935 B
Puppet

## confdroid_nagios::server::service.pp
# Module name: confdroid_nagios
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class manages services for the confdroid_nagios module.
###############################################################################
class confdroid_nagios::server::service (
) inherits confdroid_nagios::params {
require confdroid_nagios::server::files
if $ng_nagios_server == $fqdn {
require confdroid_nagios::server::access_rules
require confdroid_nagios::nagios::config
exec { 'ng_restart_httpd':
command => 'systemctl restart httpd',
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
refreshonly => true,
}
service { $ng_nagios_service:
ensure => running,
name => $ng_nagios_service,
enable => true,
hasrestart => true,
hasstatus => true,
require => Exec['ng_restart_httpd'],
}
}
}