Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added placement_group parameter for cluster compute. Issue 3232. #3236

Merged
merged 1 commit into from
Jun 18, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions library/cloud/ec2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(),
Expand All @@ -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')
Expand Down Expand Up @@ -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:
Expand All @@ -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,
Expand Down