Class: Ansible::Ruby::Modules::Docker_service

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

Overview

Consumes docker compose to start, shutdown and scale services. Works with compose versions 1 and 2. Compose can be read from a docker-compose.yml (or .yaml) file or inline using the C(definition) option. See the examples for more details. Supports check mode.

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

#buildBoolean?

Returns Whether or not to build images before starting containers.,Missing images will always be built.,If an image is present and C(build) is false, the image will not be built.,If an image is present and C(build) is true, the image will be built.

Returns:

  • (Boolean, nil)

    Whether or not to build images before starting containers.,Missing images will always be built.,If an image is present and C(build) is false, the image will not be built.,If an image is present and C(build) is true, the image will be built.



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

attribute :build

#debugBoolean?

Returns Include I(actions) in the return values.

Returns:

  • (Boolean, nil)

    Include I(actions) in the return values.



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

attribute :debug

#definitionObject?

Returns Provide docker-compose yaml describing one or more services, networks and volumes.,Mutually exclusive with C(project_src) and C(project_files).

Returns:

  • (Object, nil)

    Provide docker-compose yaml describing one or more services, networks and volumes.,Mutually exclusive with C(project_src) and C(project_files).



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

attribute :definition

#dependenciesBoolean?

Returns When C(state) is I(present) specify whether or not to include linked services.

Returns:

  • (Boolean, nil)

    When C(state) is I(present) specify whether or not to include linked services.



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

attribute :dependencies

#filesObject?

Returns List of file names relative to C(project_src). Overrides docker-compose.yml or docker-compose.yaml.,Files are loaded and merged in the order given.

Returns:

  • (Object, nil)

    List of file names relative to C(project_src). Overrides docker-compose.yml or docker-compose.yaml.,Files are loaded and merged in the order given.



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

attribute :files

#hostname_checkBoolean?

Returns Whether or not to check the Docker daemon’s hostname against the name provided in the client certificate.

Returns:

  • (Boolean, nil)

    Whether or not to check the Docker daemon’s hostname against the name provided in the client certificate.



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

attribute :hostname_check

#project_nameObject?

Returns Provide a project name. If not provided, the project name is taken from the basename of C(project_src).,Required when no C(definition) is provided.

Returns:

  • (Object, nil)

    Provide a project name. If not provided, the project name is taken from the basename of C(project_src).,Required when no C(definition) is provided.



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

attribute :project_name

#project_srcObject?

Returns Path to a directory containing a docker-compose.yml or docker-compose.yaml file.,Mutually exclusive with C(definition).,Required when no C(definition) is provided.

Returns:

  • (Object, nil)

    Path to a directory containing a docker-compose.yml or docker-compose.yaml file.,Mutually exclusive with C(definition).,Required when no C(definition) is provided.



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

attribute :project_src

#recreate:always, ...

Returns By default containers will be recreated when their configuration differs from the service definition.,Setting to I(never) ignores configuration differences and leaves existing containers unchanged.,Setting to I(always) forces recreation of all existing containers.

Returns:

  • (:always, :never, :smart, nil)

    By default containers will be recreated when their configuration differs from the service definition.,Setting to I(never) ignores configuration differences and leaves existing containers unchanged.,Setting to I(always) forces recreation of all existing containers.



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

attribute :recreate

#remove_imagesObject?

Returns Use with state I(absent) to remove the all images or only local images.

Returns:

  • (Object, nil)

    Use with state I(absent) to remove the all images or only local images.



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

attribute :remove_images

#remove_volumesBoolean?

Returns Use with state I(absent) to remove data volumes.

Returns:

  • (Boolean, nil)

    Use with state I(absent) to remove data volumes.



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

attribute :remove_volumes

#restartedBoolean?

Returns Use with state I(present) to restart all containers.

Returns:

  • (Boolean, nil)

    Use with state I(present) to restart all containers.



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

attribute :restarted

#scaleObject?

Returns When C(sate) is I(present) scale services. Provide a dictionary of key/value pairs where the key is the name of the service and the value is an integer count for the number of containers.

Returns:

  • (Object, nil)

    When C(sate) is I(present) scale services. Provide a dictionary of key/value pairs where the key is the name of the service and the value is an integer count for the number of containers.



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

attribute :scale

#servicesObject?

Returns When C(state) is I(present) run I(docker-compose up) on a subset of services.

Returns:

  • (Object, nil)

    When C(state) is I(present) run I(docker-compose up) on a subset of services.



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

attribute :services

#state:absent, ...

Returns Desired state of the project.,Specifying I(present) is the same as running I(docker-compose up).,Specifying I(absent) is the same as running I(docker-compose down).

Returns:

  • (:absent, :present, nil)

    Desired state of the project.,Specifying I(present) is the same as running I(docker-compose up).,Specifying I(absent) is the same as running I(docker-compose down).



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

attribute :state

#stoppedBoolean?

Returns Use with state I(present) to leave the containers in an exited or non-running state.

Returns:

  • (Boolean, nil)

    Use with state I(present) to leave the containers in an exited or non-running state.



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

attribute :stopped