Class: Ansible::Ruby::Modules::Docker

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, #initialize, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#cap_addBoolean?

Returns Add capabilities for the container. Requires docker-py >= 0.5.0.

Returns:

  • (Boolean, nil)

    Add capabilities for the container. Requires docker-py >= 0.5.0.



189
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 189

attribute :cap_add

#cap_dropBoolean?

Returns Drop capabilities for the container. Requires docker-py >= 0.5.0.

Returns:

  • (Boolean, nil)

    Drop capabilities for the container. Requires docker-py >= 0.5.0.



193
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 193

attribute :cap_drop

#commandString?

Returns Command used to match and launch containers.

Returns:

  • (String, nil)

    Command used to match and launch containers.



25
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 25

attribute :command

#countInteger?

Returns Number of matching containers that should be in the desired state.

Returns:

  • (Integer, nil)

    Number of matching containers that should be in the desired state.



10
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 10

attribute :count

#cpu_setObject?

Returns CPUs in which to allow execution. Requires docker-py >= 0.6.0.

Returns:

  • (Object, nil)

    CPUs in which to allow execution. Requires docker-py >= 0.6.0.



186
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 186

attribute :cpu_set

#cpu_sharesInteger?

Returns CPU shares (relative weight). Requires docker-py >= 0.6.0.

Returns:

  • (Integer, nil)

    CPU shares (relative weight). Requires docker-py >= 0.6.0.



208
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 208

attribute :cpu_shares

#detachBoolean?

Returns Enable detached mode to leave the container running in background. If disabled, fail unless the process exits cleanly.

Returns:

  • (Boolean, nil)

    Enable detached mode to leave the container running in background. If disabled, fail unless the process exits cleanly.



129
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 129

attribute :detach

#devicesArray<String>, ...

Returns List of host devices to expose to container.

Returns:

  • (Array<String>, String, nil)

    List of host devices to expose to container



57
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 57

attribute :devices

#dnsObject?

Returns List of custom DNS servers for the container.

Returns:

  • (Object, nil)

    List of custom DNS servers for the container.



126
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 126

attribute :dns

#docker_api_versionString?

Returns Remote API version to use. This defaults to the current default as specified by docker-py.

Returns:

  • (String, nil)

    Remote API version to use. This defaults to the current default as specified by docker-py.



97
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 97

attribute :docker_api_version

#docker_urlString?

Returns URL of the host running the docker daemon. This will default to the env var DOCKER_HOST if unspecified.

Returns:

  • (String, nil)

    URL of the host running the docker daemon. This will default to the env var DOCKER_HOST if unspecified.



73
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 73

attribute :docker_url

#docker_userObject?

Returns Username or UID to use within the container.

Returns:

  • (Object, nil)

    Username or UID to use within the container



101
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 101

attribute :docker_user

#domainnameObject?

Returns Container domain name.

Returns:

  • (Object, nil)

    Container domain name.



116
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 116

attribute :domainname

#emailObject?

Returns Remote API email.

Returns:

  • (Object, nil)

    Remote API email.



110
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 110

attribute :email

#entrypointObject?

Returns Corresponds to “–entrypoint“ option of “docker run“ command and “ENTRYPOINT“ directive of Dockerfile. Used to match and launch containers.

Returns:

  • (Object, nil)

    Corresponds to “–entrypoint“ option of “docker run“ command and “ENTRYPOINT“ directive of Dockerfile. Used to match and launch containers.



22
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 22

attribute :entrypoint

#envHash?

Returns Pass a dict of environment variables to the container.

Returns:

  • (Hash, nil)

    Pass a dict of environment variables to the container.



119
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 119

attribute :env

#env_fileObject?

Returns Pass in a path to a file with environment variable (FOO=BAR). If a key value is present in both explicitly presented (i.e. as ‘env’) and in the environment file, the explicit value will override. Requires docker-py >= 1.4.0.

Returns:

  • (Object, nil)

    Pass in a path to a file with environment variable (FOO=BAR). If a key value is present in both explicitly presented (i.e. as ‘env’) and in the environment file, the explicit value will override. Requires docker-py >= 1.4.0.



123
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 123

attribute :env_file

#exposeArray<Integer>, ...

Returns List of additional container ports to expose for port mappings or links. If the port is already exposed using EXPOSE in a Dockerfile, you don’t need to expose it again.

Returns:

  • (Array<Integer>, Integer, nil)

    List of additional container ports to expose for port mappings or links. If the port is already exposed using EXPOSE in a Dockerfile, you don’t need to expose it again.



37
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 37

attribute :expose

#extra_hostsHash?

Returns Dict of custom host-to-IP mappings to be defined in the container.

Returns:

  • (Hash, nil)

    Dict of custom host-to-IP mappings to be defined in the container



178
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 178

attribute :extra_hosts

#hostnameObject?

Returns Container hostname.

Returns:

  • (Object, nil)

    Container hostname.



113
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 113

attribute :hostname

#imageString

Returns Container image used to match and launch containers.

Returns:

  • (String)

    Container image used to match and launch containers.



14
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 14

attribute :image

#insecure_registryBoolean?

Returns Use insecure private registry by HTTP instead of HTTPS. Needed for docker-py >= 0.5.0.

Returns:

  • (Boolean, nil)

    Use insecure private registry by HTTP instead of HTTPS. Needed for docker-py >= 0.5.0.



182
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 182

attribute :insecure_registry

#labelsObject?

Returns Set container labels. Requires docker >= 1.6 and docker-py >= 1.2.0.

Returns:

  • (Object, nil)

    Set container labels. Requires docker >= 1.6 and docker-py >= 1.2.0.



197
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 197

attribute :labels

Returns List of other containers to link within this container with an optional,alias. Use docker CLI-style syntax: C(redis:myredis).

Returns:

  • (Array<String>, String, nil)

    List of other containers to link within this container with an optional,alias. Use docker CLI-style syntax: C(redis:myredis).



53
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 53

attribute :links

#log_driver:"json-file", ...

Returns You can specify a different logging driver for the container than for the daemon. “json-file” Default logging driver for Docker. Writes JSON messages to file. docker logs command is available only for this logging driver. “none” disables any logging for the container. “syslog” Syslog logging driver for Docker. Writes log messages to syslog. docker logs command is not available for this logging driver. “journald” Journald logging driver for Docker. Writes log messages to “journald”. “gelf” Graylog Extended Log Format (GELF) logging driver for Docker. Writes log messages to a GELF endpoint likeGraylog or Logstash. “fluentd” Fluentd logging driver for Docker. Writes log messages to “fluentd” (forward input). “awslogs” (added in 2.1) Awslogs logging driver for Docker. Writes log messages to AWS Cloudwatch Logs. If not defined explicitly, the Docker daemon’s default (“json-file”) will apply. Requires docker >= 1.6.0.

Returns:

  • (:"json-file", :none, :syslog, :journald, :gelf, :fluentd, :awslogs, nil)

    You can specify a different logging driver for the container than for the daemon. “json-file” Default logging driver for Docker. Writes JSON messages to file. docker logs command is available only for this logging driver. “none” disables any logging for the container. “syslog” Syslog logging driver for Docker. Writes log messages to syslog. docker logs command is not available for this logging driver. “journald” Journald logging driver for Docker. Writes log messages to “journald”. “gelf” Graylog Extended Log Format (GELF) logging driver for Docker. Writes log messages to a GELF endpoint likeGraylog or Logstash. “fluentd” Fluentd logging driver for Docker. Writes log messages to “fluentd” (forward input). “awslogs” (added in 2.1) Awslogs logging driver for Docker. Writes log messages to AWS Cloudwatch Logs. If not defined explicitly, the Docker daemon’s default (“json-file”) will apply. Requires docker >= 1.6.0.



61
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 61

attribute :log_driver

#log_optHash?

Returns Additional options to pass to the logging driver selected above. See Docker ‘log-driver <docs.docker.com/reference/logging/overview/>` documentation for more information. Requires docker >=1.7.0.

Returns:

  • (Hash, nil)

    Additional options to pass to the logging driver selected above. See Docker ‘log-driver <docs.docker.com/reference/logging/overview/>` documentation for more information. Requires docker >=1.7.0.



65
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 65

attribute :log_opt

#lxc_confObject?

Returns LXC configuration parameters, such as C(lxc.aa_profile:unconfined).

Returns:

  • (Object, nil)

    LXC configuration parameters, such as C(lxc.aa_profile:unconfined).



145
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 145

attribute :lxc_conf

#memory_limitInteger?

Returns RAM allocated to the container as a number of bytes or as a human-readable string like “512MB”. Leave as “0” to specify no limit.

Returns:

  • (Integer, nil)

    RAM allocated to the container as a number of bytes or as a human-readable string like “512MB”. Leave as “0” to specify no limit.



69
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 69

attribute :memory_limit

#nameString?

Returns Name used to match and uniquely name launched containers. Explicit names are used to uniquely identify a single container or to link among containers. Mutually exclusive with a “count” other than “1”.

Returns:

  • (String, nil)

    Name used to match and uniquely name launched containers. Explicit names are used to uniquely identify a single container or to link among containers. Mutually exclusive with a “count” other than “1”.



29
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 29

attribute :name

#netBoolean?

Returns Network mode for the launched container: bridge, none, container:<name|id>,or host. Requires docker >= 0.11.

Returns:

  • (Boolean, nil)

    Network mode for the launched container: bridge, none, container:<name|id>,or host. Requires docker >= 0.11.



156
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 156

attribute :net

#passwordObject?

Returns Remote API password.

Returns:

  • (Object, nil)

    Remote API password.



107
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 107

attribute :password

#pidObject?

Returns Set the PID namespace mode for the container (currently only supports ‘host’). Requires docker-py >= 1.0.0 and docker >= 1.5.0.

Returns:

  • (Object, nil)

    Set the PID namespace mode for the container (currently only supports ‘host’). Requires docker-py >= 1.0.0 and docker >= 1.5.0



160
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 160

attribute :pid

#portsArray<String>, ...

Returns List containing private to public port mapping specification. Use docker ‘CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)’ where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is - a host interface. The container ports need to be exposed either in the Dockerfile or via the C(expose) option.

Returns:

  • (Array<String>, String, nil)

    List containing private to public port mapping specification. Use docker ‘CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)’ where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is - a host interface. The container ports need to be exposed either in the Dockerfile or via the C(expose) option.



33
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 33

attribute :ports

#privilegedBoolean?

Returns Whether the container should run in privileged mode or not.

Returns:

  • (Boolean, nil)

    Whether the container should run in privileged mode or not.



141
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 141

attribute :privileged

#publish_all_portsBoolean?

Returns Publish all exposed ports to the host interfaces.

Returns:

  • (Boolean, nil)

    Publish all exposed ports to the host interfaces.



41
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 41

attribute :publish_all_ports

#pull:missing, ...

Returns Control when container images are updated from the C(docker_url) registry. If “missing,” images will be pulled only when missing from the host; if ‘“always,” the registry will be checked for a newer version of the image’ each time the task executes.

Returns:

  • (:missing, :always, nil)

    Control when container images are updated from the C(docker_url) registry. If “missing,” images will be pulled only when missing from the host; if ‘“always,” the registry will be checked for a newer version of the image’ each time the task executes.



18
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 18

attribute :pull

#read_onlyObject?

Returns Mount the container’s root filesystem as read only.

Returns:

  • (Object, nil)

    Mount the container’s root filesystem as read only



167
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 167

attribute :read_only

#registryString?

Returns Remote registry URL to pull images from.

Returns:

  • (String, nil)

    Remote registry URL to pull images from.



163
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 163

attribute :registry

#restart_policy:no, ...

Returns Container restart policy.,The ‘unless-stopped’ choice is only available starting in Ansible 2.1 and for Docker 1.9 and above.

Returns:

  • (:no, :"on-failure", :always, :"unless-stopped", nil)

    Container restart policy.,The ‘unless-stopped’ choice is only available starting in Ansible 2.1 and for Docker 1.9 and above.



170
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 170

attribute :restart_policy

#restart_policy_retryInteger?

Returns Maximum number of times to restart a container. Leave as “0” for unlimited retries.

Returns:

  • (Integer, nil)

    Maximum number of times to restart a container. Leave as “0” for unlimited retries.



174
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 174

attribute :restart_policy_retry

#signalString?

Returns With the state “killed”, you can alter the signal sent to the container.

Returns:

  • (String, nil)

    With the state “killed”, you can alter the signal sent to the container.



133
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 133

attribute :signal

#state:present, ...

Returns Assert the container’s desired state. “present” only asserts that the matching containers exist. “started” asserts that the matching containers both exist and are running, but takes no action if any configuration has changed. “reloaded” (added in Ansible 1.9) asserts that all matching containers are running and restarts any that have any images or configuration out of date. “restarted” unconditionally restarts (or starts) the matching containers. “stopped” and ‘“killed” stop and kill all matching containers. “absent” stops and then’ removes any matching containers.

Returns:

  • (:present, :started, :reloaded, :restarted, :stopped, :killed, :absent, nil)

    Assert the container’s desired state. “present” only asserts that the matching containers exist. “started” asserts that the matching containers both exist and are running, but takes no action if any configuration has changed. “reloaded” (added in Ansible 1.9) asserts that all matching containers are running and restarts any that have any images or configuration out of date. “restarted” unconditionally restarts (or starts) the matching containers. “stopped” and ‘“killed” stop and kill all matching containers. “absent” stops and then’ removes any matching containers.



137
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 137

attribute :state

#stdin_openBoolean?

Returns Keep stdin open after a container is launched.

Returns:

  • (Boolean, nil)

    Keep stdin open after a container is launched.



148
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 148

attribute :stdin_open

#stop_timeoutInteger?

Returns How many seconds to wait for the container to stop before killing it.

Returns:

  • (Integer, nil)

    How many seconds to wait for the container to stop before killing it.



200
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 200

attribute :stop_timeout

#timeoutInteger?

Returns Docker daemon response timeout in seconds.

Returns:

  • (Integer, nil)

    Docker daemon response timeout in seconds.



204
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 204

attribute :timeout

#tls_ca_certString?

Returns Path to a PEM-encoded certificate authority to secure the Docker connection. This has no effect if use_tls is encrypt.

Returns:

  • (String, nil)

    Path to a PEM-encoded certificate authority to secure the Docker connection. This has no effect if use_tls is encrypt.



89
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 89

attribute :tls_ca_cert

#tls_client_certString?

Returns Path to the PEM-encoded certificate used to authenticate docker client. If specified tls_client_key must be valid.

Returns:

  • (String, nil)

    Path to the PEM-encoded certificate used to authenticate docker client. If specified tls_client_key must be valid



81
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 81

attribute :tls_client_cert

#tls_client_keyString?

Returns Path to the PEM-encoded key used to authenticate docker client. If specified tls_client_cert must be valid.

Returns:

  • (String, nil)

    Path to the PEM-encoded key used to authenticate docker client. If specified tls_client_cert must be valid



85
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 85

attribute :tls_client_key

#tls_hostnameString?

Returns A hostname to check matches what’s supplied in the docker server’s certificate. If unspecified, the hostname is taken from the docker_url.

Returns:

  • (String, nil)

    A hostname to check matches what’s supplied in the docker server’s certificate. If unspecified, the hostname is taken from the docker_url.



93
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 93

attribute :tls_hostname

#ttyBoolean?

Returns Allocate a pseudo-tty within the container.

Returns:

  • (Boolean, nil)

    Allocate a pseudo-tty within the container.



152
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 152

attribute :tty

#ulimitsObject?

Returns ulimits, list ulimits with name, soft and optionally hard limit separated by colons. e.g. nofile:1024:2048 Requires docker-py >= 1.2.0 and docker >= 1.6.0.

Returns:

  • (Object, nil)

    ulimits, list ulimits with name, soft and optionally hard limit separated by colons. e.g. nofile:1024:2048 Requires docker-py >= 1.2.0 and docker >= 1.6.0



212
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 212

attribute :ulimits

#use_tls:no, ...

Returns Whether to use tls to connect to the docker server. “no” means not to use tls (and ignore any other tls related parameters). “encrypt” means to use tls to encrypt the connection to the server. “verify” means to also verify that the server’s certificate is valid for the server (this both verifies the certificate against the CA and that the certificate was issued for that host. If this is unspecified, tls will only be used if one of the other tls options require it.

Returns:

  • (:no, :encrypt, :verify, nil)

    Whether to use tls to connect to the docker server. “no” means not to use tls (and ignore any other tls related parameters). “encrypt” means to use tls to encrypt the connection to the server. “verify” means to also verify that the server’s certificate is valid for the server (this both verifies the certificate against the CA and that the certificate was issued for that host. If this is unspecified, tls will only be used if one of the other tls options require it.



77
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 77

attribute :use_tls

#usernameObject?

Returns Remote API username.

Returns:

  • (Object, nil)

    Remote API username.



104
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 104

attribute :username

#volumesArray<String>, ...

Returns List of volumes to mount within the container,Use docker CLI-style syntax: C(/host:/container),You can specify a read mode for the mount with either C(ro) or C(rw). Starting at version 2.1, SELinux hosts can additionally use C(z) or C(Z) mount options to use a shared or private label for the volume.

Returns:

  • (Array<String>, String, nil)

    List of volumes to mount within the container,Use docker CLI-style syntax: C(/host:/container),You can specify a read mode for the mount with either C(ro) or C(rw). Starting at version 2.1, SELinux hosts can additionally use C(z) or C(Z) mount options to use a shared or private label for the volume.



45
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 45

attribute :volumes

#volumes_fromArray<String>, ...

Returns List of names of containers to mount volumes from.

Returns:

  • (Array<String>, String, nil)

    List of names of containers to mount volumes from.



49
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker.rb', line 49

attribute :volumes_from