Class: Ansible::Ruby::Modules::Docker_volume

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

Overview

Create/remove Docker volumes. Performs largely the same function as the “docker volume” CLI subcommand.

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

#driverString?

Returns Specify the type of volume. Docker provides the C(local) driver, but 3rd party drivers can also be used.

Returns:

  • (String, nil)

    Specify the type of volume. Docker provides the C(local) driver, but 3rd party drivers can also be used.



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

attribute :driver

#driver_optionsHash?

Returns Dictionary of volume settings. Consult docker docs for valid options and values: U(docs.docker.com/engine/reference/commandline/volume_create/#driver-specific-options).

Returns:



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

attribute :driver_options

#force:yes, ...

Returns With state C(present) causes the volume to be deleted and recreated if the volume already exist and the driver, driver options or labels differ. This will cause any data in the existing volume to be lost.

Returns:

  • (:yes, :no, nil)

    With state C(present) causes the volume to be deleted and recreated if the volume already exist and the driver, driver options or labels differ. This will cause any data in the existing volume to be lost.



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

attribute :force

#labelsObject?

Returns List of labels to set for the volume.

Returns:

  • (Object, nil)

    List of labels to set for the volume



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

attribute :labels

#nameString

Returns Name of the volume to operate on.

Returns:

  • (String)

    Name of the volume to operate on.



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

attribute :name

#state:absent, ...

Returns C(absent) deletes the volume.,C(present) creates the volume, if it does not already exist.

Returns:

  • (:absent, :present, nil)

    C(absent) deletes the volume.,C(present) creates the volume, if it does not already exist.



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

attribute :state