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

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/core/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, #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 ‘present’ to archive an image to a .tar file.

Returns:

  • (String, nil)

    Use with state ‘present’ to archive an image to a .tar file.



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

attribute :archive_path

#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.



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

attribute :container_limits

#dockerfileString?

Returns Use with state ‘present’ to provide an alternate name for the Dockerfile to use when building an image.

Returns:

  • (String, nil)

    Use with state ‘present’ to provide an alternate name for the Dockerfile to use when building an image.



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

attribute :dockerfile

#forceBoolean?

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:

  • (Boolean, 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.



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

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.



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

attribute :http_timeout

#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’.



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

attribute :name

#nocacheBoolean?

Returns Do not use cache when building an image.

Returns:

  • (Boolean, nil)

    Do not use cache when building an image.



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

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.



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

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.



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

attribute :pull

#repositoryString?

Returns Full path to a repository. Use with state ‘present’ to tag the image into the repository.

Returns:

  • (String, nil)

    Full path to a repository. Use with state ‘present’ to tag the image into the repository.



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

attribute :repository

#rmBoolean?

Returns Remove intermediate containers after build.

Returns:

  • (Boolean, nil)

    Remove intermediate containers after build.



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

attribute :rm

#state:absent, ...

Returns Make assertions about the state of an image.,When ‘absent’ an image will be removed. Use the force option to un-tag and remove all images matching the provided name.,When ‘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 ‘absent’ an image will be removed. Use the force option to un-tag and remove all images matching the provided name.,When ‘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).



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

attribute :state

#tagString?

Returns Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to ‘latest’ when pulling an image.

Returns:

  • (String, nil)

    Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to ‘latest’ when pulling an image.



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

attribute :tag

#use_tlsfalse, ...

Returns DEPRECATED. Whether to use tls to connect to the docker server. Set to ‘no’ when TLS will not be used. Set to ‘encrypt’ to use TLS. And set to ‘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:

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

    DEPRECATED. Whether to use tls to connect to the docker server. Set to ‘no’ when TLS will not be used. Set to ‘encrypt’ to use TLS. And set to ‘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.



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

attribute :use_tls