Class: Ansible::Ruby::Modules::Consul_kv
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Consul_kv
- Defined in:
- lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb
Overview
Allows the addition, modification and deletion of key/value entries in a consul cluster via the agent. The entire contents of the record, including the indices, flags and session are returned as ‘value’. If the key represents a prefix then Note that when a value is removed, the existing value if any is returned as part of the results. See www.consul.io/docs/agent/http.html#kv for more details.
Instance Method Summary collapse
-
#cas ⇒ Object?
Used when acquiring a lock with a session.
-
#flags ⇒ Object?
Opaque integer value that can be passed when setting a value.
-
#host ⇒ String?
Host of the consul agent defaults to localhost.
-
#key ⇒ String
The key at which the value should be stored.
-
#port ⇒ Integer?
The port on which the consul agent is running.
-
#recurse ⇒ Boolean?
If the key represents a prefix, each entry with the prefix can be retrieved by setting this to true.
-
#scheme ⇒ String?
The protocol scheme on which the consul agent is running.
-
#session ⇒ String?
The session that should be used to acquire or release a lock associated with a key/value pair.
-
#state ⇒ :present, ...
The action to take with the supplied key and value.
-
#token ⇒ Object?
The token key indentifying an ACL rule set that controls access to the key value pair.
-
#validate_certs ⇒ Boolean?
Whether to verify the tls certificate of the consul agent.
-
#value ⇒ String, Integer
The value should be associated with the given key, required if state is present.
Methods inherited from Base
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
#cas ⇒ Object?
Returns used when acquiring a lock with a session. If the cas is 0, then Consul will only put the key if it does not already exist. If the cas value is non-zero, then the key is only set if the index matches the ModifyIndex of that key.
36 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 36 attribute :cas |
#flags ⇒ Object?
Returns opaque integer value that can be passed when setting a value.
39 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 39 attribute :flags |
#host ⇒ String?
Returns host of the consul agent defaults to localhost.
42 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 42 attribute :host |
#key ⇒ String
Returns the key at which the value should be stored.
17 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 17 attribute :key |
#port ⇒ Integer?
Returns the port on which the consul agent is running.
46 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 46 attribute :port |
#recurse ⇒ Boolean?
Returns if the key represents a prefix, each entry with the prefix can be retrieved by setting this to true.
25 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 25 attribute :recurse |
#scheme ⇒ String?
Returns the protocol scheme on which the consul agent is running.
50 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 50 attribute :scheme |
#session ⇒ String?
Returns the session that should be used to acquire or release a lock associated with a key/value pair.
29 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 29 attribute :session |
#state ⇒ :present, ...
Returns the action to take with the supplied key and value. If the state is ‘present’, the key contents will be set to the value supplied, ‘changed’ will be set to true only if the value was different to the current contents. The state ‘absent’ will remove the key/value pair, again ‘changed’ will be set to true only if the key actually existed prior to the removal. An attempt can be made to obtain or free the lock associated with a key/value pair with the states ‘acquire’ or ‘release’ respectively. a valid session must be supplied to make the attempt changed will be true if the attempt is successful, false otherwise.
13 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 13 attribute :state |
#token ⇒ Object?
Returns the token key indentifying an ACL rule set that controls access to the key value pair.
33 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 33 attribute :token |
#validate_certs ⇒ Boolean?
Returns whether to verify the tls certificate of the consul agent.
54 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 54 attribute :validate_certs |
#value ⇒ String, Integer
Returns the value should be associated with the given key, required if state is present.
21 |
# File 'lib/ansible/ruby/modules/generated/extras/clustering/consul_kv.rb', line 21 attribute :value |