OP#436 add service exec
This commit is contained in:
@@ -8,12 +8,19 @@ class confdroid_nagios::server::service (
|
|||||||
) inherits confdroid_nagios::params {
|
) inherits confdroid_nagios::params {
|
||||||
require confdroid_nagios::server::files
|
require confdroid_nagios::server::files
|
||||||
if $ng_nagios_server == $fqdn {
|
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:
|
service { $ng_nagios_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
name => $ng_nagios_service,
|
name => $ng_nagios_service,
|
||||||
enable => true,
|
enable => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
|
requires => Exec['restart_httpd'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user