Class: Ansible::Ruby::Modules::Docker_secret

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

Overview

Create and remove Docker secrets in a Swarm environment. Similar to ‘docker secret create` and `docker secret rm`. Adds to the metadata of new secrets ’ansible_key’, an encrypted hash representation of the data, which is then used in future runs to test if a secret has changed. If ‘ansible_key is not present, then a secret will not be updated unless the C(force) option is set. Updates to secrets are performed by removing the secret and creating it again.

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

#dataString?

Returns String. The value of the secret. Required when state is C(present).

Returns:

  • (String, nil)

    String. The value of the secret. Required when state is C(present).



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

attribute :data

#forceSymbol?

Returns Use with state C(present) to always remove and recreate an existing secret.,If I(true), an existing secret will be replaced, even if it has not changed.

Returns:

  • (Symbol, nil)

    Use with state C(present) to always remove and recreate an existing secret.,If I(true), an existing secret will be replaced, even if it has not changed.



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

attribute :force

#labelsHash?

Returns A map of key:value meta data, where both the I(key) and I(value) are expected to be a string.,If new meta data is provided, or existing meta data is modified, the secret will be updated by removing it and creating it again.

Returns:

  • (Hash, nil)

    A map of key:value meta data, where both the I(key) and I(value) are expected to be a string.,If new meta data is provided, or existing meta data is modified, the secret will be updated by removing it and creating it again.



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

attribute :labels

#nameString

Returns The name of the secret.

Returns:

  • (String)

    The name of the secret.



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

attribute :name

#state:absent, ...

Returns Set to C(present), if the secret should exist, and C(absent), if it should not.

Returns:

  • (:absent, :present, nil)

    Set to C(present), if the secret should exist, and C(absent), if it should not.



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

attribute :state