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 IAM instance profile in ec2_lc module

This commit is contained in:
Frédéric de Villamil 2014-07-01 07:47:04 +02:00
parent fcdafb7ff4
commit 00c6253c8f

View file

@ -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'),
)
)