mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
consul: minor fixes in docs (#5767)
* consul: minor fixes in docs * additional docs fixes * adjustments from review
This commit is contained in:
parent
4dc897d559
commit
217a62aca2
1 changed files with 29 additions and 28 deletions
|
@ -23,7 +23,7 @@ description:
|
||||||
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 I(check_name) and optionally a I(check_id)."
|
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
|
- 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
|
||||||
|
@ -37,7 +37,7 @@ options:
|
||||||
state:
|
state:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- register or deregister the consul service, defaults to present
|
- Register or deregister the consul service, defaults to present.
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
choices: ['present', 'absent']
|
||||||
service_name:
|
service_name:
|
||||||
|
@ -45,30 +45,30 @@ options:
|
||||||
description:
|
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 omitted if registering
|
required if registering a service. May be omitted if registering
|
||||||
a node level check
|
a node level check.
|
||||||
service_id:
|
service_id:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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.
|
defaults to the service name if supplied.
|
||||||
host:
|
host:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- host of the consul agent defaults to localhost
|
- Host of the consul agent defaults to localhost.
|
||||||
default: localhost
|
default: localhost
|
||||||
port:
|
port:
|
||||||
type: int
|
type: int
|
||||||
description:
|
description:
|
||||||
- the port on which the consul agent is running
|
- The port on which the consul agent is running.
|
||||||
default: 8500
|
default: 8500
|
||||||
scheme:
|
scheme:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- the protocol scheme on which the consul agent is running
|
- The protocol scheme on which the consul agent is running.
|
||||||
default: http
|
default: http
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- whether to verify the TLS certificate of the consul agent
|
- Whether to verify the TLS certificate of the consul agent.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
notes:
|
notes:
|
||||||
|
@ -78,12 +78,12 @@ options:
|
||||||
service_port:
|
service_port:
|
||||||
type: int
|
type: int
|
||||||
description:
|
description:
|
||||||
- the port on which the service is listening. Can optionally be supplied for
|
- 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
|
registration of a service, i.e. if I(service_name) or I(service_id) is set.
|
||||||
service_address:
|
service_address:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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
|
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
|
C(/v1/agent/service/register) API method, so refer to the Consul API
|
||||||
documentation for further details.
|
documentation for further details.
|
||||||
|
@ -91,63 +91,64 @@ options:
|
||||||
type: list
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
description:
|
description:
|
||||||
- tags that will be attached to the service registration.
|
- Tags that will be attached to the service registration.
|
||||||
script:
|
script:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- the script/command that will be run periodically to check the health
|
- The script/command that will be run periodically to check the health of the service.
|
||||||
of the service. Scripts require I(interval) and vice versa.
|
- Requires I(interval) to be provided.
|
||||||
interval:
|
interval:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- the interval at which the service check will be run. This is a number
|
- The interval at which the service check will be run.
|
||||||
with a s or m suffix to signify the units of seconds or minutes e.g
|
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).
|
||||||
C(15s) or C(1m). If no suffix is supplied, m will be used by default e.g.
|
If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s).
|
||||||
C(1) will be C(1m). Required if the I(script) parameter is specified.
|
- Required if one of the parameters I(script), I(http), or I(tcp) is specified.
|
||||||
check_id:
|
check_id:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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.
|
I(check_name). Ignored if part of a service definition.
|
||||||
check_name:
|
check_name:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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.
|
part of service definition.
|
||||||
ttl:
|
ttl:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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
|
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.
|
ttl expires. If it doesn't the check will be considered failed.
|
||||||
Required if registering a check and the script an interval are missing
|
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
|
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
|
signify the units of seconds or minutes e.g C(15s) or C(1m).
|
||||||
is supplied, C(m) will be used by default e.g. C(1) will be C(1m)
|
If no suffix is supplied C(s) will be used by default, e.g. C(10) will be C(10s).
|
||||||
tcp:
|
tcp:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- Checks can be registered with a TCP port. This means that consul
|
- 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).
|
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).
|
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'
|
version_added: '1.3.0'
|
||||||
http:
|
http:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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.
|
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:
|
timeout:
|
||||||
type: str
|
type: str
|
||||||
description:
|
description:
|
||||||
- A custom HTTP check timeout. The consul default is 10 seconds.
|
- 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
|
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).
|
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:
|
token:
|
||||||
type: str
|
type: str
|
||||||
description:
|
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 = '''
|
EXAMPLES = '''
|
||||||
|
|
Loading…
Reference in a new issue