Files
confdroid_nagios/manifests/server/service.pp

29 lines
884 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
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'],
}
}
}