Puppet Class: qualys_agent::service
- Defined in:
- manifests/service.pp
Summary
Configure the Qualys agent serviceOverview
Manage the system service that runs the Qualys agent
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'manifests/service.pp', line 5
class qualys_agent::service {
if $qualys_agent::manage_service {
# Force service stopped and disabled if agent ensure is "absent"
$ensure = $qualys_agent::ensure ? {
present => $qualys_agent::service_ensure,
absent => 'stopped',
}
$enable = $qualys_agent::ensure ? {
present => $qualys_agent::service_enable,
absent => false,
}
service { 'qualys_agent':
ensure => $ensure,
enable => $enable,
name => $qualys_agent::service_name,
subscribe => [
File['qualys_config'],
File['qualys_log_config'],
File['qualys_udc_log_config'],
$qualys_agent::package::package_dep,
],
}
# Do not create an ordering dependency if we are removing the agent
$service_dep = $qualys_agent::ensure ? {
present => Service['qualys_agent'],
absent => undef,
}
}
}
|