mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[cloud][route53_health_check] Consider port in identity test (#22762)
Allows to health-check two services on one host. Before, asking for 2 health checks being present for `http://myhost:8888` and `http://myhost:9999` resulted in just a single health check, as this module considered the two specs as equal. Bonus: route53_health_check now passes style guidelines
This commit is contained in:
@@ -156,7 +156,13 @@ def find_health_check(conn, wanted):
|
|||||||
"""Searches for health checks that have the exact same set of immutable values"""
|
"""Searches for health checks that have the exact same set of immutable values"""
|
||||||
for check in conn.get_list_health_checks().HealthChecks:
|
for check in conn.get_list_health_checks().HealthChecks:
|
||||||
config = check.HealthCheckConfig
|
config = check.HealthCheckConfig
|
||||||
if config.get('IPAddress') == wanted.ip_addr and config.get('FullyQualifiedDomainName') == wanted.fqdn and config.get('Type') == wanted.hc_type and config.get('RequestInterval') == str(wanted.request_interval):
|
if (
|
||||||
|
config.get('IPAddress') == wanted.ip_addr and
|
||||||
|
config.get('FullyQualifiedDomainName') == wanted.fqdn and
|
||||||
|
config.get('Type') == wanted.hc_type and
|
||||||
|
config.get('RequestInterval') == str(wanted.request_interval) and
|
||||||
|
config.get('Port') == str(wanted.port)
|
||||||
|
):
|
||||||
return check
|
return check
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ lib/ansible/modules/cloud/amazon/rds_param_group.py
|
|||||||
lib/ansible/modules/cloud/amazon/rds_subnet_group.py
|
lib/ansible/modules/cloud/amazon/rds_subnet_group.py
|
||||||
lib/ansible/modules/cloud/amazon/redshift.py
|
lib/ansible/modules/cloud/amazon/redshift.py
|
||||||
lib/ansible/modules/cloud/amazon/route53.py
|
lib/ansible/modules/cloud/amazon/route53.py
|
||||||
lib/ansible/modules/cloud/amazon/route53_health_check.py
|
|
||||||
lib/ansible/modules/cloud/amazon/s3.py
|
lib/ansible/modules/cloud/amazon/s3.py
|
||||||
lib/ansible/modules/cloud/amazon/s3_lifecycle.py
|
lib/ansible/modules/cloud/amazon/s3_lifecycle.py
|
||||||
lib/ansible/modules/cloud/amazon/s3_sync.py
|
lib/ansible/modules/cloud/amazon/s3_sync.py
|
||||||
|
|||||||
Reference in New Issue
Block a user