|
|
|
@ -19,24 +19,24 @@
|
|
|
|
|
|
|
|
|
|
DOCUMENTATION = """
|
|
|
|
|
module: consul
|
|
|
|
|
short_description: "Add, modify & delete services within a consul cluster.
|
|
|
|
|
See http://consul.io for more details."
|
|
|
|
|
short_description: "Add, modify & delete services within a consul cluster."
|
|
|
|
|
description:
|
|
|
|
|
- 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
|
|
|
|
|
- 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
|
|
|
|
|
- "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
|
|
|
|
|
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 http://consul.io for more details."
|
|
|
|
|
requirements:
|
|
|
|
|
- "python >= 2.6"
|
|
|
|
|
- python-consul
|
|
|
|
@ -50,7 +50,7 @@ options:
|
|
|
|
|
required: true
|
|
|
|
|
choices: ['present', 'absent']
|
|
|
|
|
service_name:
|
|
|
|
|
desciption:
|
|
|
|
|
description:
|
|
|
|
|
- Unique name for the service on a node, must be unique per node,
|
|
|
|
|
required if registering a service. May be ommitted if registering
|
|
|
|
|
a node level check
|
|
|
|
@ -125,8 +125,7 @@ options:
|
|
|
|
|
default: None
|
|
|
|
|
token:
|
|
|
|
|
description:
|
|
|
|
|
- the token key indentifying an ACL rule set. May be required to
|
|
|
|
|
register services.
|
|
|
|
|
- the token key indentifying an ACL rule set. May be required to register services.
|
|
|
|
|
required: false
|
|
|
|
|
default: None
|
|
|
|
|
"""
|
|
|
|
|