1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #5767/217a62ac backport][stable-6] consul: minor fixes in docs (#5771)

consul: minor fixes in docs (#5767)

* consul: minor fixes in docs

* additional docs fixes

* adjustments from review

(cherry picked from commit 217a62aca2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-01-06 15:17:46 +01:00 committed by GitHub
parent 2d450a5a36
commit c8b8668212
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ description:
by Consul from the Service name and id respectively by appending 'service:'
Node level checks require a I(check_name) and optionally a I(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
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
@ -37,7 +37,7 @@ options:
state:
type: str
description:
- register or deregister the consul service, defaults to present
- Register or deregister the consul service, defaults to present.
default: present
choices: ['present', 'absent']
service_name:
@ -45,30 +45,30 @@ options:
description:
- Unique name for the service on a node, must be unique per node,
required if registering a service. May be omitted if registering
a node level check
a node level check.
service_id:
type: str
description:
- the ID for the service, must be unique per node. If I(state=absent),
- The ID for the service, must be unique per node. If I(state=absent),
defaults to the service name if supplied.
host:
type: str
description:
- host of the consul agent defaults to localhost
- Host of the consul agent defaults to localhost.
default: localhost
port:
type: int
description:
- the port on which the consul agent is running
- The port on which the consul agent is running.
default: 8500
scheme:
type: str
description:
- the protocol scheme on which the consul agent is running
- The protocol scheme on which the consul agent is running.
default: http
validate_certs:
description:
- whether to verify the TLS certificate of the consul agent
- Whether to verify the TLS certificate of the consul agent.
type: bool
default: true
notes:
@ -78,12 +78,12 @@ options:
service_port:
type: int
description:
- the port on which the service is listening. Can optionally be supplied for
registration of a service, i.e. if I(service_name) or I(service_id) is set
- The port on which the service is listening. Can optionally be supplied for
registration of a service, i.e. if I(service_name) or I(service_id) is set.
service_address:
type: str
description:
- the address to advertise that the service will be listening on.
- The address to advertise that the service will be listening on.
This value will be passed as the I(address) parameter to Consul's
C(/v1/agent/service/register) API method, so refer to the Consul API
documentation for further details.
@ -91,63 +91,64 @@ options:
type: list
elements: str
description:
- tags that will be attached to the service registration.
- Tags that will be attached to the service registration.
script:
type: str
description:
- the script/command that will be run periodically to check the health
of the service. Scripts require I(interval) and vice versa.
- The script/command that will be run periodically to check the health of the service.
- Requires I(interval) to be provided.
interval:
type: str
description:
- the interval at which the service check will be run. This is a number
with a s or m suffix to signify the units of seconds or minutes e.g
C(15s) or C(1m). If no suffix is supplied, m will be used by default e.g.
C(1) will be C(1m). Required if the I(script) parameter is specified.
- The interval at which the service check will be run.
This is a number with a C(s) or C(m) suffix to signify the units of seconds or minutes e.g C(15s) or C(1m).
If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s).
- Required if one of the parameters I(script), I(http), or I(tcp) is specified.
check_id:
type: str
description:
- an ID for the service check. If I(state=absent), defaults to
- An ID for the service check. If I(state=absent), defaults to
I(check_name). Ignored if part of a service definition.
check_name:
type: str
description:
- a name for the service check. Required if standalone, ignored if
- Name for the service check. Required if standalone, ignored if
part of service definition.
ttl:
type: str
description:
- checks can be registered with a ttl instead of a I(script) and I(interval)
- Checks can be registered with a ttl instead of a I(script) and I(interval)
this means that the service will check in with the agent before the
ttl expires. If it doesn't the check will be considered failed.
Required if registering a check and the script an interval are missing
Similar to the interval this is a number with a s or m suffix to
signify the units of seconds or minutes e.g C(15s) or C(1m). If no suffix
is supplied, C(m) will be used by default e.g. C(1) will be C(1m)
Similar to the interval this is a number with a C(s) or C(m) suffix to
signify the units of seconds or minutes e.g C(15s) or C(1m).
If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s).
tcp:
type: str
description:
- Checks can be registered with a TCP port. This means that consul
will check if the connection attempt to that port is successful (that is, the port is currently accepting connections).
The format is C(host:port), for example C(localhost:80).
I(interval) must also be provided with this option.
- Requires I(interval) to be provided.
version_added: '1.3.0'
http:
type: str
description:
- checks can be registered with an HTTP endpoint. This means that consul
- Checks can be registered with an HTTP endpoint. This means that consul
will check that the http endpoint returns a successful HTTP status.
I(interval) must also be provided with this option.
- Requires I(interval) to be provided.
timeout:
type: str
description:
- A custom HTTP check timeout. The consul default is 10 seconds.
Similar to the interval this is a number with a C(s) or C(m) suffix to
signify the units of seconds or minutes, e.g. C(15s) or C(1m).
If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s).
token:
type: str
description:
- the token key identifying an ACL rule set. May be required to register services.
- The token key identifying an ACL rule set. May be required to register services.
'''
EXAMPLES = '''