Puppet Function: psick::ensure2service
- Defined in:
-
functions/ensure2service.pp
- Function type:
- Puppet Language
Overview
psick::ensure2service(Psick::Ensure $ensure = 'present', Enum['ensure','enable'] $param = 'ensure') ⇒ Any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'functions/ensure2service.pp', line 1
function psick::ensure2service (
Psick::Ensure $ensure = 'present',
Enum['ensure','enable'] $param = 'ensure',
) {
case $param {
'ensure': {
$output = $ensure ? {
'absent' => 'stopped',
false => 'stopped',
default => 'running',
}
}
'enable': {
$output = $ensure ? {
'absent' => false,
false => false,
default => true,
}
}
default: {}
}
}
|