|
|
@ -19,24 +19,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
DOCUMENTATION = """
|
|
|
|
DOCUMENTATION = """
|
|
|
|
module: consul
|
|
|
|
module: consul
|
|
|
|
short_description: "Add, modify & delete services within a consul cluster.
|
|
|
|
short_description: "Add, modify & delete services within a consul cluster."
|
|
|
|
See http://consul.io for more details."
|
|
|
|
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- registers services and checks for an agent with a consul cluster. A service
|
|
|
|
- Registers services and checks for an agent with a consul cluster.
|
|
|
|
is some process running on the agent node that should be advertised by
|
|
|
|
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,
|
|
|
|
consul's discovery mechanism. It may optionally supply a check definition,
|
|
|
|
a periodic service test to notify the consul cluster of service's health.
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
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:'.
|
|
|
|
by Consul from the Service name and id respectively by appending 'service:'
|
|
|
|
Node level checks require a check_name and optionally a check_id.
|
|
|
|
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
|
|
|
|
- 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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
changed occurred. An api method is planned to supply this metadata so at that
|
|
|
|
stage change management will be added.
|
|
|
|
stage change management will be added.
|
|
|
|
|
|
|
|
- "See http://consul.io for more details."
|
|
|
|
requirements:
|
|
|
|
requirements:
|
|
|
|
- "python >= 2.6"
|
|
|
|
- "python >= 2.6"
|
|
|
|
- python-consul
|
|
|
|
- python-consul
|
|
|
@ -50,7 +50,7 @@ options:
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
choices: ['present', 'absent']
|
|
|
|
choices: ['present', 'absent']
|
|
|
|
service_name:
|
|
|
|
service_name:
|
|
|
|
desciption:
|
|
|
|
description:
|
|
|
|
- Unique name for the service on a node, must be unique per node,
|
|
|
|
- Unique name for the service on a node, must be unique per node,
|
|
|
|
required if registering a service. May be ommitted if registering
|
|
|
|
required if registering a service. May be ommitted if registering
|
|
|
|
a node level check
|
|
|
|
a node level check
|
|
|
@ -125,8 +125,7 @@ options:
|
|
|
|
default: None
|
|
|
|
default: None
|
|
|
|
token:
|
|
|
|
token:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- the token key indentifying an ACL rule set. May be required to
|
|
|
|
- the token key indentifying an ACL rule set. May be required to register services.
|
|
|
|
register services.
|
|
|
|
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
default: None
|
|
|
|
default: None
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|