Class: Ansible::Ruby::Modules::Docker_container

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

Overview

Manage the life cycle of docker containers. Supports check mode. Run with –check and –diff to view config difference and list of actions to be taken.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name

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

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, validates

Constructor Details

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

Instance Method Details

#auto_remove:yes, ...

Returns enable auto-removal of the container on daemon side when the container’s process exits.

Returns:

  • (:yes, :no, nil)

    enable auto-removal of the container on daemon side when the container’s process exits



13
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 13

attribute :auto_remove

#blkio_weightObject?

Returns Block IO (relative weight), between 10 and 1000.

Returns:

  • (Object, nil)

    Block IO (relative weight), between 10 and 1000.



17
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 17

attribute :blkio_weight

#cap_dropArray<String>, ...

Returns List of capabilities to drop from the container.

Returns:

  • (Array<String>, String, nil)

    List of capabilities to drop from the container.



24
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 24

attribute :cap_drop

#capabilitiesArray<String>, ...

Returns List of capabilities to add to the container.

Returns:

  • (Array<String>, String, nil)

    List of capabilities to add to the container.



20
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 20

attribute :capabilities

#cleanup:yes, ...

Returns Use with I(detach=false) to remove the container after successful execution.

Returns:

  • (:yes, :no, nil)

    Use with I(detach=false) to remove the container after successful execution.



28
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 28

attribute :cleanup

#commandArray<String>, ...

Returns Command to execute when the container starts. A command may be either a string or a list. Prior to version 2.4, strings were split on commas.

Returns:

  • (Array<String>, String, nil)

    Command to execute when the container starts. A command may be either a string or a list. Prior to version 2.4, strings were split on commas.



32
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 32

attribute :command

#cpu_periodInteger?

Returns Limit CPU CFS (Completely Fair Scheduler) period.

Returns:

  • (Integer, nil)

    Limit CPU CFS (Completely Fair Scheduler) period



36
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 36

attribute :cpu_period

#cpu_quotaInteger?

Returns Limit CPU CFS (Completely Fair Scheduler) quota.

Returns:

  • (Integer, nil)

    Limit CPU CFS (Completely Fair Scheduler) quota



40
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 40

attribute :cpu_quota

#cpu_sharesObject?

Returns CPU shares (relative weight).

Returns:

  • (Object, nil)

    CPU shares (relative weight).



50
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 50

attribute :cpu_shares

#cpuset_cpusObject?

Returns CPUs in which to allow execution C(1,3) or C(1-3).

Returns:

  • (Object, nil)

    CPUs in which to allow execution C(1,3) or C(1-3).



44
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 44

attribute :cpuset_cpus

#cpuset_memsObject?

Returns Memory nodes (MEMs) in which to allow execution C(0-3) or C(0,1).

Returns:

  • (Object, nil)

    Memory nodes (MEMs) in which to allow execution C(0-3) or C(0,1)



47
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 47

attribute :cpuset_mems

#detachBoolean?

Returns Enable detached mode to leave the container running in background. If disabled, the task will reflect the status of the container run (failed if the command failed).

Returns:

  • (Boolean, nil)

    Enable detached mode to leave the container running in background. If disabled, the task will reflect the status of the container run (failed if the command failed).



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

attribute :detach

#devicesArray<String>, ...

Returns List of host device bindings to add to the container. Each binding is a mapping expressed in the format: <path_on_host>:<path_in_container>:<cgroup_permissions>.

Returns:

  • (Array<String>, String, nil)

    List of host device bindings to add to the container. Each binding is a mapping expressed in the format: <path_on_host>:<path_in_container>:<cgroup_permissions>



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

attribute :devices

#dns_optsObject?

Returns list of DNS options.

Returns:

  • (Object, nil)

    list of DNS options



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

attribute :dns_opts

#dns_search_domainsObject?

Returns List of custom DNS search domains.

Returns:

  • (Object, nil)

    List of custom DNS search domains.



67
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 67

attribute :dns_search_domains

#dns_serversObject?

Returns List of custom DNS servers.

Returns:

  • (Object, nil)

    List of custom DNS servers.



64
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 64

attribute :dns_servers

#domainnameObject?

Returns Container domainname.

Returns:

  • (Object, nil)

    Container domainname.



70
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 70

attribute :domainname

#entrypointObject?

Returns Command that overwrites the default ENTRYPOINT of the image.

Returns:

  • (Object, nil)

    Command that overwrites the default ENTRYPOINT of the image.



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

attribute :entrypoint

#envHash?

Returns Dictionary of key,value pairs.

Returns:

  • (Hash, nil)

    Dictionary of key,value pairs.



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

attribute :env

#env_fileString?

Returns Path to a file, present on the target, containing environment variables I(FOO=BAR).,If variable also present in C(env), then C(env) value will override.

Returns:

  • (String, nil)

    Path to a file, present on the target, containing environment variables I(FOO=BAR).,If variable also present in C(env), then C(env) value will override.



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

attribute :env_file

#etc_hostsObject?

Returns Dict of host-to-IP mappings, where each host name is a key in the dictionary. Each host name will be added to the container’s /etc/hosts file.

Returns:

  • (Object, nil)

    Dict of host-to-IP mappings, where each host name is a key in the dictionary. Each host name will be added to the container’s /etc/hosts file.



84
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 84

attribute :etc_hosts

#exposed_portsArray<Integer>, ...

Returns List of additional container ports which informs Docker that the container listens on the specified network ports at runtime. If the port is already exposed using EXPOSE in a Dockerfile, it does not need to be exposed again.

Returns:

  • (Array<Integer>, Integer, nil)

    List of additional container ports which informs Docker that the container listens on the specified network ports at runtime. If the port is already exposed using EXPOSE in a Dockerfile, it does not need to be exposed again.



87
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 87

attribute :exposed_ports

#force_kill:yes, ...

Returns Use the kill command when stopping a running container.

Returns:

  • (:yes, :no, nil)

    Use the kill command when stopping a running container.



91
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 91

attribute :force_kill

#groupsObject?

Returns List of additional group names and/or IDs that the container process will run as.

Returns:

  • (Object, nil)

    List of additional group names and/or IDs that the container process will run as.



95
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 95

attribute :groups

#hostnameObject?

Returns Container hostname.

Returns:

  • (Object, nil)

    Container hostname.



98
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 98

attribute :hostname

#ignore_image:yes, ...

Returns When C(state) is I(present) or I(started) the module compares the configuration of an existing container to requested configuration. The evaluation includes the image version. If the image version in the registry does not match the container, the container will be recreated. Stop this behavior by setting C(ignore_image) to I(True).

Returns:

  • (:yes, :no, nil)

    When C(state) is I(present) or I(started) the module compares the configuration of an existing container to requested configuration. The evaluation includes the image version. If the image version in the registry does not match the container, the container will be recreated. Stop this behavior by setting C(ignore_image) to I(True).



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

attribute :ignore_image

#imageString?

Returns Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry. If no tag is included, ‘latest’ will be used.

Returns:

  • (String, nil)

    Repository path and tag used to create the container. If an image is not found or pull is true, the image will be pulled from the registry. If no tag is included, ‘latest’ will be used.



105
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 105

attribute :image

#init:yes, ...

Returns Run an init inside the container that forwards signals and reaps processes. This option requires Docker API 1.25+.

Returns:

  • (:yes, :no, nil)

    Run an init inside the container that forwards signals and reaps processes. This option requires Docker API 1.25+.



109
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 109

attribute :init

#interactive:yes, ...

Returns Keep stdin open after a container is launched, even if not attached.

Returns:

  • (:yes, :no, nil)

    Keep stdin open after a container is launched, even if not attached.



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

attribute :interactive

#ipc_modeObject?

Returns Set the IPC mode for the container. Can be one of ‘container:<name|id>’ to reuse another container’s IPC namespace or ‘host’ to use the host’s IPC namespace within the container.

Returns:

  • (Object, nil)

    Set the IPC mode for the container. Can be one of ‘container:<name|id>’ to reuse another container’s IPC namespace or ‘host’ to use the host’s IPC namespace within the container.



117
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 117

attribute :ipc_mode

#keep_volumes:yes, ...

Returns Retain volumes associated with a removed container.

Returns:

  • (:yes, :no, nil)

    Retain volumes associated with a removed container.



120
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 120

attribute :keep_volumes

#kernel_memoryInteger?

Returns Kernel memory limit (format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte). Minimum is C(4M).,Omitting the unit defaults to bytes.

Returns:

  • (Integer, nil)

    Kernel memory limit (format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte). Minimum is C(4M).,Omitting the unit defaults to bytes.



127
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 127

attribute :kernel_memory

#kill_signalObject?

Returns Override default signal used to kill a running container.

Returns:

  • (Object, nil)

    Override default signal used to kill a running container.



124
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 124

attribute :kill_signal

#labelsObject?

Returns Dictionary of key value pairs.

Returns:

  • (Object, nil)

    Dictionary of key value pairs.



131
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 131

attribute :labels

Returns List of name aliases for linked containers in the format C(container_name:alias).,Setting this will force container to be restarted.

Returns:

  • (Array<String>, String, nil)

    List of name aliases for linked containers in the format C(container_name:alias).,Setting this will force container to be restarted.



134
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 134

attribute :links

#log_driverString?

Returns Specify the logging driver. Docker uses I(json-file) by default.,See L(here,docs.docker.com/config/containers/logging/configure/) for possible choices.

Returns:



138
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 138

attribute :log_driver

#log_optionsHash?

Returns Dictionary of options specific to the chosen log_driver. See docs.docker.com/engine/admin/logging/overview/ for details.

Returns:



142
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 142

attribute :log_options

#mac_addressObject?

Returns Container MAC address (e.g. 92:d0:c6:0a:29:33).

Returns:

  • (Object, nil)

    Container MAC address (e.g. 92:d0:c6:0a:29:33)



146
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 146

attribute :mac_address

#memoryString?

Returns Memory limit (format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes.

Returns:

  • (String, nil)

    Memory limit (format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes.



149
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 149

attribute :memory

#memory_reservationInteger?

Returns Memory soft limit (format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes.

Returns:

  • (Integer, nil)

    Memory soft limit (format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes.



153
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 153

attribute :memory_reservation

#memory_swapInteger?

Returns Total memory limit (memory + swap, format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes.

Returns:

  • (Integer, nil)

    Total memory limit (memory + swap, format: C(<number>)). Number is a positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes.



157
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 157

attribute :memory_swap

#memory_swappinessObject?

Returns Tune a container’s memory swappiness behavior. Accepts an integer between 0 and 100.,If not set, the value will be remain the same if container exists and will be inherited from the host machine if it is (re-)created.

Returns:

  • (Object, nil)

    Tune a container’s memory swappiness behavior. Accepts an integer between 0 and 100.,If not set, the value will be remain the same if container exists and will be inherited from the host machine if it is (re-)created.



161
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 161

attribute :memory_swappiness

#nameString

Returns Assign a name to a new container or match an existing container.,When identifying an existing container name may be a name or a long or short container ID.

Returns:

  • (String)

    Assign a name to a new container or match an existing container.,When identifying an existing container name may be a name or a long or short container ID.



164
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 164

attribute :name

#network_modeObject?

Returns Connect the container to a network. Choices are “bridge”, “host”, “none” or “container:<name|id>”.

Returns:

  • (Object, nil)

    Connect the container to a network. Choices are “bridge”, “host”, “none” or “container:<name|id>”



168
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 168

attribute :network_mode

#networksArray<Hash>, ...

Returns List of networks the container belongs to.,Each network is a dict with keys C(name), C(ipv4_address), C(ipv6_address), C(links), C(aliases).,For each network C(name) is required, all other keys are optional.,If included, C(links) or C(aliases) are lists.,For examples of the data structure and usage see EXAMPLES below.,To remove a container from one or more networks, use the C(purge_networks) option.,Note that as opposed to C(docker run …), M(docker_container) does not remove the default network if C(networks) is specified. You need to explicity use C(purge_networks) to enforce the removal of the default network (and all other networks not explicitly mentioned in C(networks)).

Returns:

  • (Array<Hash>, Hash, nil)

    List of networks the container belongs to.,Each network is a dict with keys C(name), C(ipv4_address), C(ipv6_address), C(links), C(aliases).,For each network C(name) is required, all other keys are optional.,If included, C(links) or C(aliases) are lists.,For examples of the data structure and usage see EXAMPLES below.,To remove a container from one or more networks, use the C(purge_networks) option.,Note that as opposed to C(docker run …), M(docker_container) does not remove the default network if C(networks) is specified. You need to explicity use C(purge_networks) to enforce the removal of the default network (and all other networks not explicitly mentioned in C(networks)).



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

attribute :networks

#oom_killer:yes, ...

Returns Whether or not to disable OOM Killer for the container.

Returns:

  • (:yes, :no, nil)

    Whether or not to disable OOM Killer for the container.



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

attribute :oom_killer

#oom_score_adjInteger?

Returns An integer value containing the score given to the container in order to tune OOM killer preferences.

Returns:

  • (Integer, nil)

    An integer value containing the score given to the container in order to tune OOM killer preferences.



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

attribute :oom_score_adj

#output_logs:yes, ...

Returns If set to true, output of the container command will be printed (only effective when log_driver is set to json-file or journald.

Returns:

  • (:yes, :no, nil)

    If set to true, output of the container command will be printed (only effective when log_driver is set to json-file or journald.



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

attribute :output_logs

#paused:yes, ...

Returns Use with the started state to pause running processes inside the container.

Returns:

  • (:yes, :no, nil)

    Use with the started state to pause running processes inside the container.



190
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 190

attribute :paused

#pid_modeObject?

Returns Set the PID namespace mode for the container. Currently only supports ‘host’.

Returns:

  • (Object, nil)

    Set the PID namespace mode for the container. Currently only supports ‘host’.



194
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 194

attribute :pid_mode

#privileged:yes, ...

Returns Give extended privileges to the container.

Returns:

  • (:yes, :no, nil)

    Give extended privileges to the container.



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

attribute :privileged

#published_portsObject?

Returns List of ports to publish from the container to the host.,Use docker CLI 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.,Container ports must be exposed either in the Dockerfile or via the C(expose) option.,A value of C(all) will publish all exposed container ports to random host ports, ignoring any other mappings.,If C(networks) parameter is provided, will inspect each network to see if there exists a bridge network with optional parameter com.docker.network.bridge.host_binding_ipv4. If such a network is found, then published ports where no host IP address is specified will be bound to the host IP pointed to by com.docker.network.bridge.host_binding_ipv4. Note that the first bridge network with a com.docker.network.bridge.host_binding_ipv4 value encountered in the list of C(networks) is the one that will be used.

Returns:

  • (Object, nil)

    List of ports to publish from the container to the host.,Use docker CLI 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.,Container ports must be exposed either in the Dockerfile or via the C(expose) option.,A value of C(all) will publish all exposed container ports to random host ports, ignoring any other mappings.,If C(networks) parameter is provided, will inspect each network to see if there exists a bridge network with optional parameter com.docker.network.bridge.host_binding_ipv4. If such a network is found, then published ports where no host IP address is specified will be bound to the host IP pointed to by com.docker.network.bridge.host_binding_ipv4. Note that the first bridge network with a com.docker.network.bridge.host_binding_ipv4 value encountered in the list of C(networks) is the one that will be used.



201
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 201

attribute :published_ports

#pull:yes, ...

Returns If true, always pull the latest version of an image. Otherwise, will only pull an image when missing.

Returns:

  • (:yes, :no, nil)

    If true, always pull the latest version of an image. Otherwise, will only pull an image when missing.



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

attribute :pull

#purge_networks:yes, ...

Returns Remove the container from ALL networks not included in C(networks) parameter.,Any default networks such as I(bridge), if not found in C(networks), will be removed as well.

Returns:

  • (:yes, :no, nil)

    Remove the container from ALL networks not included in C(networks) parameter.,Any default networks such as I(bridge), if not found in C(networks), will be removed as well.



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

attribute :purge_networks

#read_only:yes, ...

Returns Mount the container’s root file system as read-only.

Returns:

  • (:yes, :no, nil)

    Mount the container’s root file system as read-only.



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

attribute :read_only

#recreate:yes, ...

Returns Use with present and started states to force the re-creation of an existing container.

Returns:

  • (:yes, :no, nil)

    Use with present and started states to force the re-creation of an existing container.



216
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 216

attribute :recreate

#restart:yes, ...

Returns Use with started state to force a matching container to be stopped and restarted.

Returns:

  • (:yes, :no, nil)

    Use with started state to force a matching container to be stopped and restarted.



220
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 220

attribute :restart

#restart_policy:no, ...

Returns Container restart policy. Place quotes around I(no) option.

Returns:

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

    Container restart policy. Place quotes around I(no) option.



224
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 224

attribute :restart_policy

#restart_retriesInteger?

Returns Use with restart policy to control maximum number of restart attempts.

Returns:

  • (Integer, nil)

    Use with restart policy to control maximum number of restart attempts.



228
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 228

attribute :restart_retries

#security_optsObject?

Returns List of security options in the form of C(“label:user:User”).

Returns:

  • (Object, nil)

    List of security options in the form of C(“label:user:User”)



235
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 235

attribute :security_opts

#shm_sizeObject?

Returns Size of C(/dev/shm) (format: C(<number>)). Number is positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes. If you omit the size entirely, the system uses C(64M).

Returns:

  • (Object, nil)

    Size of C(/dev/shm) (format: C(<number>)). Number is positive integer. Unit can be C(B) (byte), C(K) (kibibyte, 1024B), C(M) (mebibyte), C(G) (gibibyte), C(T) (tebibyte), or C(P) (pebibyte).,Omitting the unit defaults to bytes. If you omit the size entirely, the system uses C(64M).



232
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 232

attribute :shm_size

#state:absent, ...

Returns I(absent) - A container matching the specified name will be stopped and removed. Use force_kill to kill the container rather than stopping it. Use keep_volumes to retain volumes associated with the removed container.,I(present) - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config. Image version will be taken into account when comparing configuration. To ignore image version use the ignore_image option. Use the recreate option to force the re-creation of the matching container. Use force_kill to kill the container rather than stopping it. Use keep_volumes to retain volumes associated with a removed container.,I(started) - Asserts there is a running container matching the name and any provided configuration. If no container matches the name, a container will be created and started. If a container matching the name is found but the configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and a new container will be created with the requested configuration and started. Image version will be taken into account when comparing configuration. To ignore image version use the ignore_image option. Use recreate to always re-create a matching container, even if it is running. Use restart to force a matching container to be stopped and restarted. Use force_kill to kill a container rather than stopping it. Use keep_volumes to retain volumes associated with a removed container.,I(stopped) - Asserts that the container is first I(present), and then if the container is running moves it to a stopped state. Use force_kill to kill a container rather than stopping it.

Returns:

  • (:absent, :present, :stopped, :started, nil)

    I(absent) - A container matching the specified name will be stopped and removed. Use force_kill to kill the container rather than stopping it. Use keep_volumes to retain volumes associated with the removed container.,I(present) - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config. Image version will be taken into account when comparing configuration. To ignore image version use the ignore_image option. Use the recreate option to force the re-creation of the matching container. Use force_kill to kill the container rather than stopping it. Use keep_volumes to retain volumes associated with a removed container.,I(started) - Asserts there is a running container matching the name and any provided configuration. If no container matches the name, a container will be created and started. If a container matching the name is found but the configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and a new container will be created with the requested configuration and started. Image version will be taken into account when comparing configuration. To ignore image version use the ignore_image option. Use recreate to always re-create a matching container, even if it is running. Use restart to force a matching container to be stopped and restarted. Use force_kill to kill a container rather than stopping it. Use keep_volumes to retain volumes associated with a removed container.,I(stopped) - Asserts that the container is first I(present), and then if the container is running moves it to a stopped state. Use force_kill to kill a container rather than stopping it.



238
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 238

attribute :state

#stop_signalObject?

Returns Override default signal used to stop the container.

Returns:

  • (Object, nil)

    Override default signal used to stop the container.



242
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 242

attribute :stop_signal

#stop_timeoutObject?

Returns Number of seconds to wait for the container to stop before sending SIGKILL.

Returns:

  • (Object, nil)

    Number of seconds to wait for the container to stop before sending SIGKILL.



245
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 245

attribute :stop_timeout

#sysctlsObject?

Returns Dictionary of key,value pairs.

Returns:

  • (Object, nil)

    Dictionary of key,value pairs.



262
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 262

attribute :sysctls

#tmpfsObject?

Returns Mount a tmpfs directory.

Returns:

  • (Object, nil)

    Mount a tmpfs directory



252
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 252

attribute :tmpfs

#to_hObject



18
19
20
21
22
23
# File 'lib/ansible/ruby/modules/custom/cloud/core/docker/docker_container.rb', line 18

def to_h
  result = super
  data = result[:docker_container]
  data[:volumes] = transform_volumes data[:volumes] if data.include? :volumes
  result
end

#trust_image_content:yes, ...

Returns If C(yes), skip image verification.

Returns:

  • (:yes, :no, nil)

    If C(yes), skip image verification.



248
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 248

attribute :trust_image_content

#tty:yes, ...

Returns Allocate a pseudo-TTY.

Returns:

  • (:yes, :no, nil)

    Allocate a pseudo-TTY.



255
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 255

attribute :tty

#ulimitsObject?

Returns List of ulimit options. A ulimit is specified as C(nofile:262144:262144).

Returns:

  • (Object, nil)

    List of ulimit options. A ulimit is specified as C(nofile:262144:262144)



259
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 259

attribute :ulimits

#userObject?

Returns Sets the username or UID used and optionally the groupname or GID for the specified command.,Can be [ user | user:group | uid | uid:gid | user:gid | uid:group ].

Returns:

  • (Object, nil)

    Sets the username or UID used and optionally the groupname or GID for the specified command.,Can be [ user | user:group | uid | uid:gid | user:gid | uid:group ]



265
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 265

attribute :user

#userns_modeObject?

Returns User namespace to use.

Returns:

  • (Object, nil)

    User namespace to use



171
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 171

attribute :userns_mode

#utsObject?

Returns Set the UTS namespace mode for the container.

Returns:

  • (Object, nil)

    Set the UTS namespace mode for the container.



268
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 268

attribute :uts

#volume_driverObject?

Returns The container volume driver.

Returns:

  • (Object, nil)

    The container volume driver.



275
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 275

attribute :volume_driver

#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).,SELinux hosts can additionally use C(z) or C(Z) 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).,SELinux hosts can additionally use C(z) or C(Z) to use a shared or private label for the volume.



271
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 271

attribute :volumes

#volumes_fromArray<String>, ...

Returns List of container names or Ids to get volumes from.

Returns:

  • (Array<String>, String, nil)

    List of container names or Ids to get volumes from.



278
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 278

attribute :volumes_from

#working_dirObject?

Returns Path to the working directory.

Returns:

  • (Object, nil)

    Path to the working directory.



282
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_container.rb', line 282

attribute :working_dir