1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adds support for kern_id param in ec2_ls module.

This commit is contained in:
Frédéric de Villamil 2014-07-01 07:34:55 +02:00
parent 746f52c5aa
commit c555b3a0b9

View file

@ -68,6 +68,12 @@ options:
required: false required: false
default: null default: null
aliases: [] aliases: []
kern_id:
description:
- Kernel id for the EC2 instance
required: false
default: null
aliases: []
spot_price: spot_price:
description: description:
- The spot price you are bidding. Only applies for an autoscaling group with spot instances. - The spot price you are bidding. Only applies for an autoscaling group with spot instances.
@ -139,6 +145,7 @@ 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')
bdm = BlockDeviceMapping() bdm = BlockDeviceMapping()
if volumes: if volumes:
@ -158,8 +165,9 @@ def create_launch_config(connection, module):
user_data=user_data, user_data=user_data,
block_device_mappings=[bdm], block_device_mappings=[bdm],
instance_type=instance_type, instance_type=instance_type,
spot_price=spot_price, instance_monitoring=instance_monitoring,
instance_monitoring=instance_monitoring) kern_id=kern_id,
spot_price=spot_price)
launch_configs = connection.get_all_launch_configurations(names=[name]) launch_configs = connection.get_all_launch_configurations(names=[name])
changed = False changed = False
@ -196,6 +204,7 @@ 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'),
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']),