From 680bc0cd846d5a1ff8ecc4eaada1f3ec6f2fa376 Mon Sep 17 00:00:00 2001 From: James Tanner Date: Tue, 12 Nov 2013 14:09:06 -0500 Subject: [PATCH] Change vpc module to use shared ec2 authorization moudle snippet --- cloud/vpc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cloud/vpc b/cloud/vpc index 8ecab435c1d..4d218136a0c 100644 --- a/cloud/vpc +++ b/cloud/vpc @@ -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 -#<> +# import module snippets +from ansible.module_utils.basic import * +from ansible.module_utils.ec2 import * main()