Class: Ansible::Ruby::Modules::Docker_image

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

Overview

Build, load or pull an image, making the image available for creating containers. Also supports tagging an image into a repository and archiving an image to a .tar file.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

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

Constructor Details

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

Instance Method Details

#archive_pathString?

Returns Use with state C(present) to archive an image to a .tar file.

Returns:

  • (String, nil)

    Use with state C(present) to archive an image to a .tar file.



12
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 12

attribute :archive_path

#buildargsHash?

Returns Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.,Docker expects the value to be a string. For convenience any non-string values will be converted to strings.,Requires Docker API >= 1.21 and docker-py >= 1.7.0.

Returns:

  • (Hash, nil)

    Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.,Docker expects the value to be a string. For convenience any non-string values will be converted to strings.,Requires Docker API >= 1.21 and docker-py >= 1.7.0.



66
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 66

attribute :buildargs

#container_limitsObject?

Returns A dictionary of limits applied to each container created by the build process.

Returns:

  • (Object, nil)

    A dictionary of limits applied to each container created by the build process.



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

attribute :container_limits

#dockerfileObject?

Returns Use with state C(present) to provide an alternate name for the Dockerfile to use when building an image.

Returns:

  • (Object, nil)

    Use with state C(present) to provide an alternate name for the Dockerfile to use when building an image.



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

attribute :dockerfile

#forceSymbol?

Returns Use with state I(absent) to un-tag and remove all images matching the specified name. Use with state C(present) to build, load or pull an image when the image already exists.

Returns:

  • (Symbol, nil)

    Use with state I(absent) to un-tag and remove all images matching the specified name. Use with state C(present) to build, load or pull an image when the image already exists.



23
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 23

attribute :force

#http_timeoutObject?

Returns Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of seconds.

Returns:

  • (Object, nil)

    Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of seconds.



27
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 27

attribute :http_timeout

#load_pathString?

Returns Use with state C(present) to load an image from a .tar file.

Returns:

  • (String, nil)

    Use with state C(present) to load an image from a .tar file.



16
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 16

attribute :load_path

#nameString

Returns Image name. Name format will be one of: name, repository/name, registry_server:port/name. When pushing or pulling an image the name can optionally include the tag by appending ‘:tag_name’.

Returns:

  • (String)

    Image name. Name format will be one of: name, repository/name, registry_server:port/name. When pushing or pulling an image the name can optionally include the tag by appending ‘:tag_name’.



30
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 30

attribute :name

#nocacheSymbol?

Returns Do not use cache when building an image.

Returns:

  • (Symbol, nil)

    Do not use cache when building an image.



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

attribute :nocache

#pathString?

Returns Use with state ‘present’ to build an image. Will be the path to a directory containing the context and Dockerfile for building an image.

Returns:

  • (String, nil)

    Use with state ‘present’ to build an image. Will be the path to a directory containing the context and Dockerfile for building an image.



34
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 34

attribute :path

#pullBoolean?

Returns When building an image downloads any updates to the FROM image in Dockerfile.

Returns:

  • (Boolean, nil)

    When building an image downloads any updates to the FROM image in Dockerfile.



38
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 38

attribute :pull

#pushSymbol?

Returns Push the image to the registry. Specify the registry as part of the I(name) or I(repository) parameter.

Returns:

  • (Symbol, nil)

    Push the image to the registry. Specify the registry as part of the I(name) or I(repository) parameter.



42
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 42

attribute :push

#repositoryString?

Returns Full path to a repository. Use with state C(present) to tag the image into the repository. Expects format I(repository:tag). If no tag is provided, will use the value of the C(tag) parameter or I(latest).

Returns:

  • (String, nil)

    Full path to a repository. Use with state C(present) to tag the image into the repository. Expects format I(repository:tag). If no tag is provided, will use the value of the C(tag) parameter or I(latest).



54
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 54

attribute :repository

#rmBoolean?

Returns Remove intermediate containers after build.

Returns:

  • (Boolean, nil)

    Remove intermediate containers after build.



46
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 46

attribute :rm

#state:absent, ...

Returns Make assertions about the state of an image.,When C(absent) an image will be removed. Use the force option to un-tag and remove all images matching the provided name.,When C(present) check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded. By default the image will be pulled from Docker Hub. To build the image, provide a path value set to a directory containing a context and Dockerfile. To load an image, specify load_path to provide a path to an archive file. To tag an image to a repository, provide a repository path. If the name contains a repository path, it will be pushed.,NOTE: C(build) is DEPRECATED and will be removed in release 2.3. Specifying C(build) will behave the same as C(present).

Returns:

  • (:absent, :present, :build, nil)

    Make assertions about the state of an image.,When C(absent) an image will be removed. Use the force option to un-tag and remove all images matching the provided name.,When C(present) check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded. By default the image will be pulled from Docker Hub. To build the image, provide a path value set to a directory containing a context and Dockerfile. To load an image, specify load_path to provide a path to an archive file. To tag an image to a repository, provide a repository path. If the name contains a repository path, it will be pushed.,NOTE: C(build) is DEPRECATED and will be removed in release 2.3. Specifying C(build) will behave the same as C(present).



58
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 58

attribute :state

#tagString?

Returns Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to I(latest).,If C(name) parameter format is I(name:tag), then tag value from C(name) will take precedence.

Returns:

  • (String, nil)

    Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to I(latest).,If C(name) parameter format is I(name:tag), then tag value from C(name) will take precedence.



62
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 62

attribute :tag

#use_tls:no, ...

Returns DEPRECATED. Whether to use tls to connect to the docker server. Set to C(no) when TLS will not be used. Set to C(encrypt) to use TLS. And set to C(verify) to use TLS and verify that the server’s certificate is valid for the server. NOTE: If you specify this option, it will set the value of the tls or tls_verify parameters.

Returns:

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

    DEPRECATED. Whether to use tls to connect to the docker server. Set to C(no) when TLS will not be used. Set to C(encrypt) to use TLS. And set to C(verify) to use TLS and verify that the server’s certificate is valid for the server. NOTE: If you specify this option, it will set the value of the tls or tls_verify parameters.



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

attribute :use_tls