diff --git a/library/cloud/ec2_lc b/library/cloud/ec2_lc index 38234fe311b..e7ffb3d65cf 100755 --- a/library/cloud/ec2_lc +++ b/library/cloud/ec2_lc @@ -91,6 +91,12 @@ options: required: false default: null 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 """ @@ -153,6 +159,7 @@ def create_launch_config(connection, module): instance_monitoring = module.params.get('instance_monitoring') kernel_id = module.params.get('kernel_id') ramdisk_id = module.params.get('ramdisk_id') + instance_profile_name = module.params.get('instance_profile_name') bdm = BlockDeviceMapping() if volumes: @@ -175,7 +182,8 @@ def create_launch_config(connection, module): instance_monitoring=instance_monitoring, kernel_id=kernel_id, 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]) changed = False @@ -219,6 +227,7 @@ def main(): spot_price=dict(type='float'), instance_monitoring=dict(default=False, type='bool'), ramdisk_id=dict(type='str'), + instance_profile_name=dict(type='str'), ) )