Class: Ansible::Ruby::Modules::Consul_session

Inherits:
Base show all
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

Methods inherited from Base

#ansible_name, #to_h

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.

Returns:

  • (:delete, :release, nil)

    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

#checksArray<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.

Returns:

  • (Array<String>, String, nil)

    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

#datacenterObject?

Returns The name of the datacenter in which the session exists or should be created.

Returns:

  • (Object, nil)

    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

#delayInteger?

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.

Returns:

  • (Integer, nil)

    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

#hostString?

Returns The host of the consul agent defaults to localhost.

Returns:

  • (String, nil)

    The host of the consul agent defaults to localhost.



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

attribute :host

#nameString?

Returns The name that should be associated with the session. This is opaque to Consul and not required.

Returns:

  • (String, nil)

    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

#nodeObject?

Returns The name of the node that with which the session will be associated. by default this is the name of the agent.

Returns:

  • (Object, nil)

    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

#portInteger?

Returns The port on which the consul agent is running.

Returns:

  • (Integer, nil)

    The port on which the consul agent is running.



38
# File 'lib/ansible/ruby/modules/generated/clustering/consul_session.rb', line 38

attribute :port

#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.



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.

Returns:

  • (:absent, :info, :list, :node, :present, nil)

    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_certsBoolean?

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

Returns:

  • (Boolean, nil)

    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