1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Support accounts with more than 100 load balancers

This commit is contained in:
Matt Martz 2015-01-12 16:56:31 -06:00 committed by Matt Clay
parent fdc52b8277
commit a078a99fae

View file

@ -152,7 +152,14 @@ def cloud_load_balancer(module, state, name, meta, algorithm, port, protocol,
'typically indicates an invalid region or an '
'incorrectly capitalized region name.')
for balancer in clb.list():
balancer_list = clb.list()
while balancer_list:
retrieved = clb.list(marker=balancer_list.pop().id)
balancer_list.extend(retrieved)
if len(retrieved) < 2:
break
for balancer in balancer_list:
if name != balancer.name and name != balancer.id:
continue