Class: Ansible::Ruby::Modules::Docker_secret
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Docker_secret
- 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
-
#data ⇒ String?
String.
-
#force ⇒ Symbol?
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.
-
#labels ⇒ Hash?
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.
-
#name ⇒ String
The name of the secret.
-
#state ⇒ :absent, ...
Set to C(present), if the secret should exist, and C(absent), if it should not.
Methods inherited from Base
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
#data ⇒ String?
Returns 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 |
#force ⇒ Symbol?
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.
24 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_secret.rb', line 24 attribute :force |
#labels ⇒ Hash?
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.
20 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_secret.rb', line 20 attribute :labels |
#name ⇒ String
Returns 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.
32 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_secret.rb', line 32 attribute :state |