mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
ec2_vol_facts: set filters to default value (#51589)
Fixes: #51554 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
c459f040da
commit
c20722474a
2 changed files with 13 additions and 4 deletions
|
@ -65,9 +65,8 @@ except ImportError:
|
|||
pass # caught by imported HAS_BOTO3
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ec2 import connect_to_aws, ec2_argument_spec, get_aws_connection_info, boto3_conn, HAS_BOTO3, boto3_tag_list_to_ansible_dict
|
||||
from ansible.module_utils.ec2 import ec2_argument_spec, get_aws_connection_info, boto3_conn, HAS_BOTO3, boto3_tag_list_to_ansible_dict
|
||||
from ansible.module_utils.ec2 import ansible_dict_to_boto3_filter_list, camel_dict_to_snake_dict
|
||||
from ansible.module_utils._text import to_native
|
||||
|
||||
|
||||
def get_volume_info(volume, region):
|
||||
|
@ -114,7 +113,6 @@ def list_ec2_volumes(connection, module, region):
|
|||
|
||||
try:
|
||||
all_volumes = describe_volumes_with_backoff(connection, ansible_dict_to_boto3_filter_list(sanitized_filters))
|
||||
|
||||
except ClientError as e:
|
||||
module.fail_json(msg=e.response, exception=traceback.format_exc())
|
||||
|
||||
|
@ -128,7 +126,7 @@ def main():
|
|||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(
|
||||
dict(
|
||||
filters=dict(default=None, type='dict')
|
||||
filters=dict(default={}, type='dict')
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue