Merge pull request #3236 from lwade/ec2_placementzone

Added placement_group parameter for cluster compute. Issue 3232.
reviewable/pr18780/r1
Michael DeHaan 12 years ago
commit b1d96bc839

@ -142,6 +142,13 @@ options:
required: false required: false
default: null default: null
aliases: [] 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: vpc_subnet_id:
version_added: "1.1" version_added: "1.1"
description: description:
@ -223,6 +230,7 @@ def main():
ec2_url = dict(aliases=['EC2_URL']), ec2_url = dict(aliases=['EC2_URL']),
ec2_secret_key = dict(aliases=['EC2_SECRET_KEY'], no_log=True), ec2_secret_key = dict(aliases=['EC2_SECRET_KEY'], no_log=True),
ec2_access_key = dict(aliases=['EC2_ACCESS_KEY']), ec2_access_key = dict(aliases=['EC2_ACCESS_KEY']),
placement_group = dict(),
user_data = dict(), user_data = dict(),
instance_tags = dict(), instance_tags = dict(),
vpc_subnet_id = dict(), vpc_subnet_id = dict(),
@ -247,6 +255,7 @@ def main():
ec2_url = module.params.get('ec2_url') ec2_url = module.params.get('ec2_url')
ec2_secret_key = module.params.get('ec2_secret_key') ec2_secret_key = module.params.get('ec2_secret_key')
ec2_access_key = module.params.get('ec2_access_key') ec2_access_key = module.params.get('ec2_access_key')
placement_group = module.params.get('placement_group')
user_data = module.params.get('user_data') user_data = module.params.get('user_data')
instance_tags = module.params.get('instance_tags') instance_tags = module.params.get('instance_tags')
vpc_subnet_id = module.params.get('vpc_subnet_id') vpc_subnet_id = module.params.get('vpc_subnet_id')
@ -310,7 +319,6 @@ def main():
count_remaining = count_remaining - len(running_instances) 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. # 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: if count_remaining > 0:
try: try:
@ -320,7 +328,8 @@ def main():
'min_count': count_remaining, 'min_count': count_remaining,
'max_count': count_remaining, 'max_count': count_remaining,
'monitoring_enabled': monitoring, 'monitoring_enabled': monitoring,
'placement': zone, 'placement': zone,
'placement_group': placement_group,
'instance_type': instance_type, 'instance_type': instance_type,
'kernel_id': kernel, 'kernel_id': kernel,
'ramdisk_id': ramdisk, 'ramdisk_id': ramdisk,

Loading…
Cancel
Save