Adds RAM disk id support for ec2_lc module.
This commit is contained in:
parent
c555b3a0b9
commit
fcdafb7ff4
1 changed files with 14 additions and 5 deletions
|
@ -68,7 +68,7 @@ options:
|
|||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
kern_id:
|
||||
kernel_id:
|
||||
description:
|
||||
- Kernel id for the EC2 instance
|
||||
required: false
|
||||
|
@ -85,6 +85,12 @@ options:
|
|||
required: false
|
||||
default: false
|
||||
aliases: []
|
||||
ramdisk_id:
|
||||
description:
|
||||
- A RAM disk id for the instances.
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
extends_documentation_fragment: aws
|
||||
"""
|
||||
|
||||
|
@ -145,7 +151,8 @@ def create_launch_config(connection, module):
|
|||
instance_type = module.params.get('instance_type')
|
||||
spot_price = module.params.get('spot_price')
|
||||
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()
|
||||
|
||||
if volumes:
|
||||
|
@ -166,8 +173,9 @@ def create_launch_config(connection, module):
|
|||
block_device_mappings=[bdm],
|
||||
instance_type=instance_type,
|
||||
instance_monitoring=instance_monitoring,
|
||||
kern_id=kern_id,
|
||||
spot_price=spot_price)
|
||||
kernel_id=kernel_id,
|
||||
spot_price=spot_price,
|
||||
ramdisk_id=ramdisk_id)
|
||||
|
||||
launch_configs = connection.get_all_launch_configurations(names=[name])
|
||||
changed = False
|
||||
|
@ -204,12 +212,13 @@ def main():
|
|||
key_name=dict(type='str'),
|
||||
security_groups=dict(type='list'),
|
||||
user_data=dict(type='str'),
|
||||
kern_id=dict(type='str'),
|
||||
kernel_id=dict(type='str'),
|
||||
volumes=dict(type='list'),
|
||||
instance_type=dict(type='str'),
|
||||
state=dict(default='present', choices=['present', 'absent']),
|
||||
spot_price=dict(type='float'),
|
||||
instance_monitoring=dict(default=False, type='bool'),
|
||||
ramdisk_id=dict(type='str'),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue