1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Change vpc module to use shared ec2 authorization moudle snippet

This commit is contained in:
James Tanner 2013-11-12 14:09:06 -05:00
parent b37a8b90a6
commit 8332a0b75e

View file

@ -494,10 +494,9 @@ def main():
)
)
region = module.params.get('region')
state = module.params.get('state')
aws_secret_key = module.params.get('aws_secret_key')
aws_access_key = module.params.get('aws_access_key')
ec2_url, aws_access_key, aws_secret_key, region = get_ec2_creds(module)
if not aws_secret_key:
if 'AWS_SECRET_KEY' in os.environ:
@ -546,7 +545,8 @@ def main():
module.exit_json(changed=changed, vpc_id=new_vpc_id, vpc=vpc_dict, subnets=subnets_changed)
# this is magic, see lib/ansible/module_common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.ec2 import *
main()