Class: Ansible::Ruby::Modules::Consul_session
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Consul_session
- Defined in:
- lib/ansible/ruby/modules/generated/clustering/consul_session.rb
Overview
Allows the addition, modification and deletion of sessions in a consul cluster. These sessions can then be used in conjunction with key value pairs to implement distributed locks. In depth documentation for working with sessions can be found at www.consul.io/docs/internals/sessions.html
Instance Method Summary collapse
-
#behavior ⇒ :delete, ...
The optional behavior that can be attached to the session when it is created.
-
#checks ⇒ Array<String>, ...
A list of checks that will be used to verify the session health.
-
#datacenter ⇒ Object?
The name of the datacenter in which the session exists or should be created.
-
#delay ⇒ Integer?
The optional lock delay that can be attached to the session when it is created.
-
#host ⇒ String?
The host of the consul agent defaults to localhost.
-
#name ⇒ String?
The name that should be associated with the session.
-
#node ⇒ Object?
The name of the node that with which the session will be associated.
-
#port ⇒ Integer?
The port on which the consul agent is running.
-
#scheme ⇒ String?
The protocol scheme on which the consul agent is running.
-
#state ⇒ :absent, ...
Whether the session should be present i.e.
-
#validate_certs ⇒ Boolean?
Whether to verify the tls certificate of the consul agent.
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
#behavior ⇒ :delete, ...
Returns The optional behavior that can be attached to the session when it is created. This controls the behavior when a session is invalidated.
50 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 50 attribute :behavior |
#checks ⇒ Array<String>, ...
Returns A list of checks that will be used to verify the session health. If all the checks fail, the session will be invalidated and any locks associated with the session will be release and can be acquired once the associated lock delay has expired.
30 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 30 attribute :checks |
#datacenter ⇒ Object?
Returns The name of the datacenter in which the session exists or should be created.
27 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 27 attribute :datacenter |
#delay ⇒ Integer?
Returns The optional lock delay that can be attached to the session when it is created. Locks for invalidated sessions ar blocked from being acquired until this delay has expired. Durations are in seconds.
20 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 20 attribute :delay |
#host ⇒ String?
Returns The host of the consul agent defaults to localhost.
34 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 34 attribute :host |
#name ⇒ String?
Returns The name that should be associated with the session. This is opaque to Consul and not required.
16 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 16 attribute :name |
#node ⇒ Object?
Returns The name of the node that with which the session will be associated. by default this is the name of the agent.
24 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 24 attribute :node |
#port ⇒ Integer?
Returns The port on which the consul agent is running.
38 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 38 attribute :port |
#scheme ⇒ String?
Returns The protocol scheme on which the consul agent is running.
42 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 42 attribute :scheme |
#state ⇒ :absent, ...
Returns Whether the session should be present i.e. created if it doesn’t exist, or absent, removed if present. If created, the ID for the session is returned in the output. If absent, the name or ID is required to remove the session. Info for a single session, all the sessions for a node or all available sessions can be retrieved by specifying info, node or list for the state; for node or info, the node name or session id is required as parameter.
12 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 12 attribute :state |
#validate_certs ⇒ Boolean?
Returns Whether to verify the tls certificate of the consul agent.
46 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 46 attribute :validate_certs |