Class: Ansible::Ruby::Modules::Consul_kv

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/clustering/consul_kv.rb

Overview

Allows the retrieval, 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

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

#casObject?

Returns Used when acquiring a lock with a session. If the C(cas) is C(0), then Consul will only put the key if it does not already exist. If the C(cas) value is non-zero, then the key is only set if the index matches the ModifyIndex of that key.

Returns:

  • (Object, nil)

    Used when acquiring a lock with a session. If the C(cas) is C(0), then Consul will only put the key if it does not already exist. If the C(cas) value is non-zero, then the key is only set if the index matches the ModifyIndex of that key.



37
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 37

attribute :cas

#flagsObject?

Returns Opaque integer value that can be passed when setting a value.

Returns:

  • (Object, nil)

    Opaque integer value that can be passed when setting a value.



40
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 40

attribute :flags

#hostString?

Returns Host of the consul agent.

Returns:

  • (String, nil)

    Host of the consul agent.



43
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 43

attribute :host

#keyString

Returns The key at which the value should be stored.

Returns:

  • (String)

    The key at which the value should be stored.



18
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 18

attribute :key

#portInteger?

Returns The port on which the consul agent is running.

Returns:

  • (Integer, nil)

    The port on which the consul agent is running.



47
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 47

attribute :port

#recurse:yes, ...

Returns If the key represents a prefix, each entry with the prefix can be retrieved by setting this to C(yes).

Returns:

  • (:yes, :no, nil)

    If the key represents a prefix, each entry with the prefix can be retrieved by setting this to C(yes).



26
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 26

attribute :recurse

#schemeString?

Returns The protocol scheme on which the consul agent is running.

Returns:

  • (String, nil)

    The protocol scheme on which the consul agent is running.



51
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 51

attribute :scheme

#sessionString?

Returns The session that should be used to acquire or release a lock associated with a key/value pair.

Returns:

  • (String, nil)

    The session that should be used to acquire or release a lock associated with a key/value pair.



30
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 30

attribute :session

#state:absent, ...

Returns The action to take with the supplied key and value. If the state is ‘present’ and ‘value` is set, the key contents will be set to the value supplied and `changed` will be set to `true` only if the value was different to the current contents. If the state is ’present’ and ‘value` is not set, the existing value associated to the key will be returned. 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.

Returns:

  • (:absent, :acquire, :present, :release, nil)

    The action to take with the supplied key and value. If the state is ‘present’ and ‘value` is set, the key contents will be set to the value supplied and `changed` will be set to `true` only if the value was different to the current contents. If the state is ’present’ and ‘value` is not set, the existing value associated to the key will be returned. 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.



14
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 14

attribute :state

#tokenObject?

Returns The token key indentifying an ACL rule set that controls access to the key value pair.

Returns:

  • (Object, nil)

    The token key indentifying an ACL rule set that controls access to the key value pair



34
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 34

attribute :token

#validate_certs:yes, ...

Returns Whether to verify the tls certificate of the consul agent.

Returns:

  • (:yes, :no, nil)

    Whether to verify the tls certificate of the consul agent.



55
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 55

attribute :validate_certs

#valueString, Integer

Returns The value should be associated with the given key, required if C(state) is C(present).

Returns:

  • (String, Integer)

    The value should be associated with the given key, required if C(state) is C(present).



22
# File 'lib/ansible/ruby/modules/generated/clustering/consul_kv.rb', line 22

attribute :value