Add parameter to enable/disable Docker start on boot
This commit is contained in:
Родитель
aa45098680
Коммит
b96087aeb2
|
@ -34,6 +34,10 @@
|
|||
# Whether you want to docker daemon to start up
|
||||
# Defaults to running
|
||||
#
|
||||
# [*service_enable*]
|
||||
# Whether you want to docker daemon to start up at boot
|
||||
# Defaults to true
|
||||
#
|
||||
# [*root_dir*]
|
||||
# Custom root directory for containers
|
||||
# Defaults to undefined
|
||||
|
@ -58,6 +62,7 @@ class docker(
|
|||
$use_upstream_package_source = $docker::params::use_upstream_package_source,
|
||||
$package_source_location = $docker::params::package_source_location,
|
||||
$service_state = $docker::params::service_state,
|
||||
$service_enable = $docker::params::service_enable,
|
||||
$root_dir = $docker::params::root_dir,
|
||||
$manage_kernel = true,
|
||||
$dns = $docker::params::dns,
|
||||
|
|
|
@ -9,6 +9,7 @@ class docker::params {
|
|||
$socket_bind = 'unix:///var/run/docker.sock'
|
||||
$use_upstream_package_source = true
|
||||
$service_state = running
|
||||
$service_enable = true
|
||||
$root_dir = undef
|
||||
$dns = undef
|
||||
case $::osfamily {
|
||||
|
|
|
@ -19,6 +19,7 @@ class docker::service (
|
|||
$tcp_bind = $docker::tcp_bind,
|
||||
$socket_bind = $docker::socket_bind,
|
||||
$service_state = $docker::service_state,
|
||||
$service_enable = $docker::service_enable,
|
||||
$root_dir = $docker::root_dir,
|
||||
$extra_parameters = $docker::extra_parameters,
|
||||
){
|
||||
|
@ -26,7 +27,7 @@ class docker::service (
|
|||
'Debian': {
|
||||
service { 'docker':
|
||||
ensure => $service_state,
|
||||
enable => true,
|
||||
enable => $service_enable,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
provider => upstart,
|
||||
|
|
Загрузка…
Ссылка в новой задаче