mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Don't use 'tenancy' in ec2 spot requests
The problem was introduced in commit f5789e8e. 'tenancy' is a parameter of ec2.run_instances, but not in ec2.request_spot_instances. So it was breaking the support for spot requests.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user