Adds RAM disk id support for ec2_lc module.

This commit is contained in:
Frédéric de Villamil 2014-07-01 07:39:06 +02:00
parent 5fcef856bc
commit 5038b6dc33

View file

@ -68,7 +68,7 @@ options:
required: false required: false
default: null default: null
aliases: [] aliases: []
kern_id: kernel_id:
description: description:
- Kernel id for the EC2 instance - Kernel id for the EC2 instance
required: false required: false
@ -85,6 +85,12 @@ options:
required: false required: false
default: false default: false
aliases: [] aliases: []
ramdisk_id:
description:
- A RAM disk id for the instances.
required: false
default: null
aliases: []
extends_documentation_fragment: aws extends_documentation_fragment: aws
""" """
@ -145,7 +151,8 @@ def create_launch_config(connection, module):
instance_type = module.params.get('instance_type') instance_type = module.params.get('instance_type')
spot_price = module.params.get('spot_price') spot_price = module.params.get('spot_price')
instance_monitoring = module.params.get('instance_monitoring') instance_monitoring = module.params.get('instance_monitoring')
kern_id = module.params.get('kern_id') kernel_id = module.params.get('kernel_id')
ramdisk_id = module.params.get('ramdisk_id')
bdm = BlockDeviceMapping() bdm = BlockDeviceMapping()
if volumes: if volumes:
@ -166,8 +173,9 @@ def create_launch_config(connection, module):
block_device_mappings=[bdm], block_device_mappings=[bdm],
instance_type=instance_type, instance_type=instance_type,
instance_monitoring=instance_monitoring, instance_monitoring=instance_monitoring,
kern_id=kern_id, kernel_id=kernel_id,
spot_price=spot_price) spot_price=spot_price,
ramdisk_id=ramdisk_id)
launch_configs = connection.get_all_launch_configurations(names=[name]) launch_configs = connection.get_all_launch_configurations(names=[name])
changed = False changed = False
@ -204,12 +212,13 @@ def main():
key_name=dict(type='str'), key_name=dict(type='str'),
security_groups=dict(type='list'), security_groups=dict(type='list'),
user_data=dict(type='str'), user_data=dict(type='str'),
kern_id=dict(type='str'), kernel_id=dict(type='str'),
volumes=dict(type='list'), volumes=dict(type='list'),
instance_type=dict(type='str'), instance_type=dict(type='str'),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
spot_price=dict(type='float'), spot_price=dict(type='float'),
instance_monitoring=dict(default=False, type='bool'), instance_monitoring=dict(default=False, type='bool'),
ramdisk_id=dict(type='str'),
) )
) )