Puppet Class: nsclient::service
- Defined in:
- manifests/service.pp
Overview
Class: nsclient::service
This private class is meant to be called from ‘nsclient`. It manages the nsclient service
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 37 38 39 40 41 42 43 44 45 46 |
# File 'manifests/service.pp', line 10
class nsclient::service (
$service_state = $nsclient::service_state,
$service_enable = $nsclient::service_enable,
$allowed_hosts = $nsclient::allowed_hosts,
$config_content = $nsclient::config_content,
$config_template = $nsclient::config_template,
$install_path = $nsclient::install_path,
$password = $nsclient::password,
) {
assert_private("You're not supposed to do that!")
if $config_content {
$real_content = $config_content
} else {
$real_content = epp($config_template)
}
case downcase($facts['os']['family']) {
'windows': {
file { "${install_path}\\nsclient.ini":
ensure => file,
owner => 'SYSTEM',
content => $real_content,
notify => Service['nscp'],
}
service { 'nscp':
ensure => $service_state,
enable => $service_enable,
require => File["${install_path}\\nsclient.ini"],
}
}
default: {
fail('This module only works on Windows based systems.')
}
}
}
|