From 1154aca746fe4dc0366ceb78839a512692c1b433 Mon Sep 17 00:00:00 2001 From: Emlyn Stokes Date: Thu, 5 Jan 2017 13:12:30 -0800 Subject: [PATCH] Paginate ASG results (#19944) --- lib/ansible/modules/cloud/amazon/ec2_asg_facts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py b/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py index b52c8846630..92d45f59c54 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_asg_facts.py @@ -298,7 +298,8 @@ def find_asgs(conn, module, name=None, tags=None): """ try: - asgs = conn.describe_auto_scaling_groups() + asgs_paginator = conn.get_paginator('describe_auto_scaling_groups') + asgs = asgs_paginator.paginate().build_full_result() except ClientError as e: module.fail_json(msg=e.message, **camel_dict_to_snake_dict(e.response))