Class: Ansible::Ruby::Modules::Consul
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Consul
- Defined in:
- lib/ansible/ruby/modules/generated/clustering/consul.rb
Overview
Registers services and checks for an agent with a consul cluster. A service is some process running on the agent node that should be advertised by consul’s discovery mechanism. It may optionally supply a check definition, a periodic service test to notify the consul cluster of service’s health. Checks may also be registered per node e.g. disk usage, or cpu usage and notify the health of the entire node to the cluster. Service level checks do not require a check name or id as these are derived by Consul from the Service name and id respectively by appending ‘service:’ Node level checks require a check_name and optionally a check_id. Currently, there is no complete way to retrieve the script, interval or ttl metadata for a registered check. Without this metadata it is not possible to tell if the data supplied with ansible represents a change to a check. As a result this does not attempt to determine changes and will always report a changed occurred. An api method is planned to supply this metadata so at that stage change management will be added. See consul.io for more details.
Instance Method Summary collapse
-
#check_id ⇒ String?
An ID for the service check, defaults to the check name, ignored if part of a service definition.
-
#check_name ⇒ String?
A name for the service check, defaults to the check id.
-
#host ⇒ String?
Host of the consul agent defaults to localhost.
-
#http ⇒ String?
Checks can be registered with an http endpoint.
-
#interval ⇒ String?
The interval at which the service check will be run.
-
#notes ⇒ Object?
Notes to attach to check when registering it.
-
#port ⇒ Integer?
The port on which the consul agent is running.
-
#scheme ⇒ String?
The protocol scheme on which the consul agent is running.
-
#script ⇒ String?
The script/command that will be run periodically to check the health of the service.
-
#service_address ⇒ String?
The address to advertise that the service will be listening on.
-
#service_id ⇒ String?
The ID for the service, must be unique per node, defaults to the service name if the service name is supplied.
-
#service_name ⇒ String?
Unique name for the service on a node, must be unique per node, required if registering a service.
-
#service_port ⇒ Integer?
The port on which the service is listening.
-
#state ⇒ :present, :absent
Register or deregister the consul service, defaults to present.
-
#tags ⇒ Array<String>, ...
A list of tags that will be attached to the service registration.
-
#timeout ⇒ Object?
A custom HTTP check timeout.
-
#token ⇒ Object?
The token key indentifying an ACL rule set.
-
#ttl ⇒ Object?
Checks can be registered with a ttl instead of a script and interval this means that the service will check in with the agent before the ttl expires.
-
#validate_certs ⇒ :yes, ...
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, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#check_id ⇒ String?
66 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 66 attribute :check_id |
#check_name ⇒ String?
70 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 70 attribute :check_name |
#host ⇒ String?
27 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 27 attribute :host |
#http ⇒ String?
77 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 77 attribute :http |
#interval ⇒ String?
62 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 62 attribute :interval |
#notes ⇒ Object?
43 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 43 attribute :notes |
#port ⇒ Integer?
31 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 31 attribute :port |
#scheme ⇒ String?
35 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 35 attribute :scheme |
#script ⇒ String?
58 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 58 attribute :script |
#service_address ⇒ String?
50 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 50 attribute :service_address |
#service_id ⇒ String?
23 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 23 attribute :service_id |
#service_name ⇒ String?
19 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 19 attribute :service_name |
#service_port ⇒ Integer?
46 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 46 attribute :service_port |
#state ⇒ :present, :absent
15 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 15 attribute :state |
#tags ⇒ Array<String>, ...
54 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 54 attribute :tags |
#timeout ⇒ Object?
81 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 81 attribute :timeout |
#token ⇒ Object?
84 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 84 attribute :token |
#ttl ⇒ Object?
74 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 74 attribute :ttl |
#validate_certs ⇒ :yes, ...
39 |
# File 'lib/ansible/ruby/modules/generated/clustering/consul.rb', line 39 attribute :validate_certs |