[cloud] Remove DryRun parameter in ec2_vpc_igw_facts check_mode (#23113)

* Remove DryRun parameter in ec2_vpc_igw_facts check_mode

Using DryRun in check mode causes errors, and is not required
(as nothing changes when calling describe_internet_gateways)

Prevents the following error:
```
{"changed": false,
 "failed": true,
  "msg": "An error occurred (DryRunOperation) when calling
          the DescribeInternetGateways operation: Request
          would have succeeded, but DryRun flag is set."}
```

* ec2_vpc_igw_facts pep8 tidy up
pull/21836/merge
Will Thames 8 years ago committed by Ryan Brown
parent 1a1e12cf46
commit e61be9ea78

@ -121,7 +121,6 @@ def list_internet_gateways(client, module):
params = dict() params = dict()
params['Filters'] = ansible_dict_to_boto3_filter_list(module.params.get('filters')) params['Filters'] = ansible_dict_to_boto3_filter_list(module.params.get('filters'))
params['DryRun'] = module.check_mode
if module.params.get("internet_gateway_ids"): if module.params.get("internet_gateway_ids"):
params['InternetGatewayIds'] = module.params.get("internet_gateway_ids") params['InternetGatewayIds'] = module.params.get("internet_gateway_ids")

@ -176,7 +176,6 @@ lib/ansible/modules/cloud/amazon/ec2_vol_facts.py
lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_options.py lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_options.py
lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_options_facts.py lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_options_facts.py
lib/ansible/modules/cloud/amazon/ec2_vpc_igw.py lib/ansible/modules/cloud/amazon/ec2_vpc_igw.py
lib/ansible/modules/cloud/amazon/ec2_vpc_igw_facts.py
lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py
lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_facts.py lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_facts.py
lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway.py

Loading…
Cancel
Save