mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
removed obsolete ec2 resource object
This commit is contained in:
parent
5963fc4641
commit
985e485706
1 changed files with 2 additions and 3 deletions
|
@ -208,7 +208,7 @@ def create_peer_connection(client, module):
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
|
|
||||||
def accept_reject_delete(state, client, resource, module):
|
def accept_reject_delete(state, client, module):
|
||||||
changed = False
|
changed = False
|
||||||
params = dict()
|
params = dict()
|
||||||
params['VpcPeeringConnectionId'] = module.params.get('peering_id')
|
params['VpcPeeringConnectionId'] = module.params.get('peering_id')
|
||||||
|
@ -246,7 +246,6 @@ def main():
|
||||||
try:
|
try:
|
||||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
||||||
client = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs)
|
client = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs)
|
||||||
resource = boto3_conn(module, conn_type='resource', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs)
|
|
||||||
except botocore.exceptions.NoCredentialsError, e:
|
except botocore.exceptions.NoCredentialsError, e:
|
||||||
module.fail_json(msg="Can't authorize connection - "+str(e))
|
module.fail_json(msg="Can't authorize connection - "+str(e))
|
||||||
|
|
||||||
|
@ -254,7 +253,7 @@ def main():
|
||||||
(changed, results) = create_peer_connection(client, module)
|
(changed, results) = create_peer_connection(client, module)
|
||||||
module.exit_json(changed=changed, peering_id=results)
|
module.exit_json(changed=changed, peering_id=results)
|
||||||
else:
|
else:
|
||||||
(changed, results) = accept_reject_delete(state, client, resource, module)
|
(changed, results) = accept_reject_delete(state, client, module)
|
||||||
module.exit_json(changed=changed, peering_id=results)
|
module.exit_json(changed=changed, peering_id=results)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue