Added placement_group parameter for cluster compute.
This commit is contained in:
parent
5cbbd2ee6d
commit
2ef0d94ab4
1 changed files with 11 additions and 2 deletions
13
cloud/ec2
13
cloud/ec2
|
@ -142,6 +142,13 @@ options:
|
|||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
placement_group:
|
||||
version_added: "1.3"
|
||||
description:
|
||||
- placement group for the instance when using EC2 Clustered Compute
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
vpc_subnet_id:
|
||||
version_added: "1.1"
|
||||
description:
|
||||
|
@ -223,6 +230,7 @@ def main():
|
|||
ec2_url = dict(aliases=['EC2_URL']),
|
||||
ec2_secret_key = dict(aliases=['EC2_SECRET_KEY'], no_log=True),
|
||||
ec2_access_key = dict(aliases=['EC2_ACCESS_KEY']),
|
||||
placement_group = dict(),
|
||||
user_data = dict(),
|
||||
instance_tags = dict(),
|
||||
vpc_subnet_id = dict(),
|
||||
|
@ -247,6 +255,7 @@ def main():
|
|||
ec2_url = module.params.get('ec2_url')
|
||||
ec2_secret_key = module.params.get('ec2_secret_key')
|
||||
ec2_access_key = module.params.get('ec2_access_key')
|
||||
placement_group = module.params.get('placement_group')
|
||||
user_data = module.params.get('user_data')
|
||||
instance_tags = module.params.get('instance_tags')
|
||||
vpc_subnet_id = module.params.get('vpc_subnet_id')
|
||||
|
@ -310,7 +319,6 @@ def main():
|
|||
count_remaining = count_remaining - len(running_instances)
|
||||
|
||||
# Both min_count and max_count equal count parameter. This means the launch request is explicit (we want count, or fail) in how many instances we want.
|
||||
|
||||
|
||||
if count_remaining > 0:
|
||||
try:
|
||||
|
@ -320,7 +328,8 @@ def main():
|
|||
'min_count': count_remaining,
|
||||
'max_count': count_remaining,
|
||||
'monitoring_enabled': monitoring,
|
||||
'placement': zone,
|
||||
'placement': zone,
|
||||
'placement_group': placement_group,
|
||||
'instance_type': instance_type,
|
||||
'kernel_id': kernel,
|
||||
'ramdisk_id': ramdisk,
|
||||
|
|
Loading…
Reference in a new issue