Merge pull request #2608 from lwade/ec2zone

Add availability zone parameter
pull/2633/merge
Michael DeHaan 12 years ago
commit 6cb6223deb

@ -47,6 +47,13 @@ options:
required: false required: false
default: null default: null
aliases: [] aliases: []
zone:
version_added: "1.2"
description:
- availability zone in which to launch the instance
required: false
default: null
aliases: []
instance_type: instance_type:
description: description:
- instance type to use for the instance - instance type to use for the instance
@ -196,6 +203,7 @@ def main():
id = dict(), id = dict(),
group = dict(), group = dict(),
group_id = dict(), group_id = dict(),
zone = dict(),
instance_type = dict(aliases=['type']), instance_type = dict(aliases=['type']),
image = dict(required=True), image = dict(required=True),
kernel = dict(), kernel = dict(),
@ -218,6 +226,7 @@ def main():
id = module.params.get('id') id = module.params.get('id')
group_name = module.params.get('group') group_name = module.params.get('group')
group_id = module.params.get('group_id') group_id = module.params.get('group_id')
zone = module.params.get('zone')
instance_type = module.params.get('instance_type') instance_type = module.params.get('instance_type')
image = module.params.get('image') image = module.params.get('image')
count = module.params.get('count') count = module.params.get('count')
@ -284,6 +293,7 @@ def main():
max_count = count_remaining, max_count = count_remaining,
monitoring_enabled = monitoring, monitoring_enabled = monitoring,
security_groups = [group_name], security_groups = [group_name],
placement = zone,
instance_type = instance_type, instance_type = instance_type,
kernel_id = kernel, kernel_id = kernel,
ramdisk_id = ramdisk, ramdisk_id = ramdisk,

Loading…
Cancel
Save