mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Allow health_check_port to be a string (#32228)
Setting health_check_port to 'traffic-port' allows the health check to use the target's traffic port.
This commit is contained in:
parent
d23da2e494
commit
710d1f074e
1 changed files with 3 additions and 2 deletions
|
@ -33,6 +33,7 @@ options:
|
||||||
health_check_port:
|
health_check_port:
|
||||||
description:
|
description:
|
||||||
- The port the load balancer uses when performing health checks on targets.
|
- The port the load balancer uses when performing health checks on targets.
|
||||||
|
Can be set to 'traffic-port' to match target port.
|
||||||
required: false
|
required: false
|
||||||
default: "The port on which each target receives traffic from the load balancer."
|
default: "The port on which each target receives traffic from the load balancer."
|
||||||
health_check_path:
|
health_check_path:
|
||||||
|
@ -361,7 +362,7 @@ def create_or_update_target_group(connection, module):
|
||||||
params['HealthCheckProtocol'] = module.params.get("health_check_protocol").upper()
|
params['HealthCheckProtocol'] = module.params.get("health_check_protocol").upper()
|
||||||
|
|
||||||
if module.params.get("health_check_port") is not None:
|
if module.params.get("health_check_port") is not None:
|
||||||
params['HealthCheckPort'] = str(module.params.get("health_check_port"))
|
params['HealthCheckPort'] = module.params.get("health_check_port")
|
||||||
|
|
||||||
if module.params.get("health_check_interval") is not None:
|
if module.params.get("health_check_interval") is not None:
|
||||||
params['HealthCheckIntervalSeconds'] = module.params.get("health_check_interval")
|
params['HealthCheckIntervalSeconds'] = module.params.get("health_check_interval")
|
||||||
|
@ -623,7 +624,7 @@ def main():
|
||||||
dict(
|
dict(
|
||||||
deregistration_delay_timeout=dict(type='int'),
|
deregistration_delay_timeout=dict(type='int'),
|
||||||
health_check_protocol=dict(choices=['http', 'https', 'tcp', 'HTTP', 'HTTPS', 'TCP'], type='str'),
|
health_check_protocol=dict(choices=['http', 'https', 'tcp', 'HTTP', 'HTTPS', 'TCP'], type='str'),
|
||||||
health_check_port=dict(type='int'),
|
health_check_port=dict(),
|
||||||
health_check_path=dict(default=None, type='str'),
|
health_check_path=dict(default=None, type='str'),
|
||||||
health_check_interval=dict(type='int'),
|
health_check_interval=dict(type='int'),
|
||||||
health_check_timeout=dict(type='int'),
|
health_check_timeout=dict(type='int'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue