mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
052be86605
commit
cc50b803df
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue