mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
[cloud] make ec2 paging() more functional and add paging to ec2_lc_facts (#27355)
This commit is contained in:
parent
ad2c1e1838
commit
d8eccdda3a
2 changed files with 11 additions and 4 deletions
|
@ -170,6 +170,8 @@ try:
|
|||
except ImportError:
|
||||
HAS_BOTO3 = False
|
||||
|
||||
from ansible.module_utils.ec2 import paging
|
||||
|
||||
|
||||
def list_launch_configs(connection, module):
|
||||
|
||||
|
@ -180,7 +182,8 @@ def list_launch_configs(connection, module):
|
|||
sort_end = module.params.get('sort_end')
|
||||
|
||||
try:
|
||||
launch_configs = connection.describe_launch_configurations(LaunchConfigurationNames=launch_config_name)
|
||||
launch_configs = {'LaunchConfigurations': paging(pause=0, marker_property='NextToken', result_key='LaunchConfigurations')
|
||||
(connection.describe_launch_configurations)(LaunchConfigurationNames=launch_config_name)}
|
||||
except ClientError as e:
|
||||
module.fail_json(msg=e.message)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue