From c9cc8d0b70ca6417679a7f69933331229c932162 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 11 Mar 2015 18:39:24 -0700 Subject: [PATCH] Initialize the value of vpc_id variable --- lib/ansible/modules/cloud/amazon/ec2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index b59d4bda669..5fb17255a0e 100755 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -783,6 +783,7 @@ def create_instances(module, ec2, vpc, override_count=None): module.fail_json(msg = str("Use only one type of parameter (group_name) or (group_id)")) sys.exit(1) + vpc_id = None if vpc_subnet_id: vpc_id = vpc.get_all_subnets(subnet_ids=[vpc_subnet_id])[0].vpc_id else: