Adds support for IAM instance profile in ec2_lc module

reviewable/pr18780/r1
Frédéric de Villamil 11 years ago
parent 5038b6dc33
commit 3a3afc7ed3

@ -91,6 +91,12 @@ options:
required: false required: false
default: null default: null
aliases: [] aliases: []
instance_profile_name:
description:
- The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instances.
required: false
default: null
aliases: []
extends_documentation_fragment: aws extends_documentation_fragment: aws
""" """
@ -153,6 +159,7 @@ def create_launch_config(connection, module):
instance_monitoring = module.params.get('instance_monitoring') instance_monitoring = module.params.get('instance_monitoring')
kernel_id = module.params.get('kernel_id') kernel_id = module.params.get('kernel_id')
ramdisk_id = module.params.get('ramdisk_id') ramdisk_id = module.params.get('ramdisk_id')
instance_profile_name = module.params.get('instance_profile_name')
bdm = BlockDeviceMapping() bdm = BlockDeviceMapping()
if volumes: if volumes:
@ -175,7 +182,8 @@ def create_launch_config(connection, module):
instance_monitoring=instance_monitoring, instance_monitoring=instance_monitoring,
kernel_id=kernel_id, kernel_id=kernel_id,
spot_price=spot_price, spot_price=spot_price,
ramdisk_id=ramdisk_id) ramdisk_id=ramdisk_id,
instance_profile_name=instance_profile_name)
launch_configs = connection.get_all_launch_configurations(names=[name]) launch_configs = connection.get_all_launch_configurations(names=[name])
changed = False changed = False
@ -219,6 +227,7 @@ def main():
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'), ramdisk_id=dict(type='str'),
instance_profile_name=dict(type='str'),
) )
) )

Loading…
Cancel
Save