Files
confdroid_nagios/manifests/server/service.pp
2026-02-14 20:41:12 +01:00

27 lines
832 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 {
exec { '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['restart_httpd'],
}
}
}