From cd7f498755bb9c0810d5cfc10c84c0dec8bbec68 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 18 Feb 2015 11:07:13 -0500 Subject: [PATCH] Revert "Revert "Don't use 'tenancy' in ec2 spot requests"" --- lib/ansible/modules/cloud/amazon/ec2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2.py b/lib/ansible/modules/cloud/amazon/ec2.py index d34931c991..4d65fbf984 100755 --- a/lib/ansible/modules/cloud/amazon/ec2.py +++ b/lib/ansible/modules/cloud/amazon/ec2.py @@ -834,7 +834,8 @@ def create_instances(module, ec2, override_count=None): if ebs_optimized: params['ebs_optimized'] = ebs_optimized - if tenancy: + # 'tenancy' always has a default value, but it is not a valid parameter for spot instance resquest + if not spot_price: params['tenancy'] = tenancy if boto_supports_profile_name_arg(ec2):