Fixed a bug where the Route 53 Health Check would add a new health check instead of updating an existing one when the user has > 100 health checks (#58539)
This commit is contained in:
parent
9cb78b4826
commit
9fc710f657
1 changed files with 19 additions and 11 deletions
|
@ -145,7 +145,11 @@ from ansible.module_utils.ec2 import ec2_argument_spec, get_aws_connection_info
|
|||
# string_match if not previously enabled
|
||||
def find_health_check(conn, wanted):
|
||||
"""Searches for health checks that have the exact same set of immutable values"""
|
||||
for check in conn.get_list_health_checks().HealthChecks:
|
||||
|
||||
results = conn.get_list_health_checks()
|
||||
|
||||
while True:
|
||||
for check in results.HealthChecks:
|
||||
config = check.HealthCheckConfig
|
||||
if (
|
||||
config.get('IPAddress') == wanted.ip_addr and
|
||||
|
@ -155,6 +159,10 @@ def find_health_check(conn, wanted):
|
|||
config.get('Port') == str(wanted.port)
|
||||
):
|
||||
return check
|
||||
|
||||
if (results.IsTruncated == 'true'):
|
||||
results = conn.get_list_health_checks(marker=results.NextMarker)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue