1
2
3
4
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
|
# File 'manifests/service.pp', line 1
class kapacitor::service {
if $kapacitor::service_manage {
case $kapacitor::service_provider {
default: {
service {$kapacitor::service_name:
ensure => $kapacitor::service_ensure,
enable => $kapacitor::service_enable,
subscribe => Package[keys($kapacitor::packages)]
}
}
"docker": {
docker_container {
$kapacitor::service_name:
* => $kapacitor::service_opts;
default:
image => $kapacitor::service_image,
ensure => $kapacitor::service_ensure
}
if $kapacitor::service_enable {
Docker_container[$kapacitor::service_name] {
restart_policy => "unless-stopped"
}
}
}
}
}
}
|