Puppet Function: dockerinstall::option

Defined in:
functions/option.pp
Function type:
Puppet Language

Overview

dockerinstall::option(String $name, Data $value)Hash

Parameters:

  • name (String)
  • value (Data)

Returns:

  • (Hash)


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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'functions/option.pp', line 1

function dockerinstall::option(String $name, Data $value) >> Hash {
  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
  $options = {
    'authorization-plugins' => Array,
    'data-root'  => String,
    'dns'        => Array,
    'dns-opts'   => Array,
    'dns-search' => Array,
    'exec-opts'  => Array,
    'exec-root'  => String,
    'experimental' => Boolean,
    'features'     => Hash,
    'storage-driver' => String,
    'storage-opts'   => Array,
    'labels'       => Array,
    'live-restore' => Boolean,
    'log-driver'   => String,
    'log-opts'     => Hash,
    'mtu'     => Integer,
    'pidfile' => String,
    'cluster-store'      => String,
    'cluster-store-opts' => Hash,
    'cluster-advertise'  => String,
    'max-concurrent-downloads' => Integer,
    'max-concurrent-uploads'   => Integer,
    'default-shm-size' => String,
    'shutdown-timeout' => Integer,
    'debug' => Boolean,
    'hosts' => String,
    'log-level' => String,
    'tls'       => Boolean,
    'tlsverify' => Boolean,
    'tlscacert' => String,
    'tlscert'   => String,
    'tlskey'    => String,
    'swarm-default-advertise-addr' => String,
    'api-cors-header' => String,
    'selinux-enabled' => Boolean,
    'userns-remap'    => String,
    'group'           => String,
    'cgroup-parent'   => String,
    'default-ulimits' => Hash,
    'init'       => Boolean,
    'init-path'  => String,
    'ipv6'       => Boolean,
    'iptables'   => Boolean,
    'ip-forward' => Boolean,
    'ip-masq'    => Boolean,
    'userland-proxy'      => Boolean,
    'userland-proxy-path' => String,
    'ip'     => String,
    'bridge' => String,
    'bip'    => Stdlib::IP::Address::V4::CIDR,
    'fixed-cidr'    => String,
    'fixed-cidr-v6' => String,
    'default-gateway'    => String,
    'default-gateway-v6' => String,
    'icc'      => Boolean,
    'raw-logs' => Boolean,
    'allow-nondistributable-artifacts' => Array,
    'registry-mirrors' => Array,
    'seccomp-profile'  => String,
    'insecure-registries' => Array,
    'no-new-privileges'   => Boolean,
    'default-runtime'     => String,
    'oom-score-adjust'    => Integer,
    'node-generic-resources' => Array,
    'runtimes'               => Hash,
    'default-address-pools'  => Array
  }

  if $options[$name] and $value =~ $options[$name] {
    { $name => $value }
  }
  else {
    {}
  }
}