From 00c6253c8f4ebf3e7b5b3209157178f405a2c3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20de=20Villamil?= Date: Tue, 1 Jul 2014 07:47:04 +0200 Subject: [PATCH] Adds support for IAM instance profile in ec2_lc module --- library/cloud/ec2_lc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/library/cloud/ec2_lc b/library/cloud/ec2_lc index 38234fe311..e7ffb3d65c 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'), ) )