ansible / ansible.builtin / v2.4.3.0-1 / module / ec2_lc_find Find AWS Autoscaling Launch Configurations | "added in version" 2.2 of ansible.builtin" Authors: Jose Armesto (@fiunchinho) preview | supported by communityansible.builtin.ec2_lc_find (v2.4.3.0-1) — module
pip
Install with pip install ansible==2.4.3.0.post1
Returns list of matching Launch Configurations for a given name, along with other useful information
Results can be sorted and sliced
It depends on boto
Based on the work by Tom Bamford (https://github.com/tombamford)
# Note: These examples do not set authentication details, see the AWS Guide for details. # Search for the Launch Configurations that start with "app" - ec2_lc_find: name_regex: app.* sort_order: descending limit: 2
limit: default: null description: - How many results to show. - Corresponds to Python slice notation like list[:limit]. required: false region: aliases: - aws_region - ec2_region description: - The AWS region to use. required: true name_regex: description: - A Launch Configuration to match - It'll be compiled as regex required: true sort_order: choices: - ascending - descending default: ascending description: - Order in which to sort results. required: false
arn: description: Name of the AMI returned: when Launch Configuration was found sample: arn:aws:autoscaling:eu-west-1:12345:launchConfiguration:d82f050e-e315:launchConfigurationName/yourproject type: string associate_public_address: description: Assign public address or not returned: when Launch Configuration was found sample: true type: boolean block_device_mappings: description: Launch Configuration block device mappings property returned: when Launch Configuration was found sample: [] type: list classic_link_vpc_security_groups: description: Launch Configuration classic link vpc security groups property returned: when Launch Configuration was found sample: [] type: list created_time: description: When it was created returned: when Launch Configuration was found sample: '2016-06-29T14:59:22.222000+00:00' type: string ebs_optimized: description: Launch Configuration EBS optimized property returned: when Launch Configuration was found sample: false type: boolean image_id: description: AMI id returned: when Launch Configuration was found sample: ami-0d75df7e type: string instance_monitoring: description: Launch Configuration instance monitoring property returned: when Launch Configuration was found sample: Enabled: false type: string instance_type: description: Type of ec2 instance returned: when Launch Configuration was found sample: t2.small type: string kernel_id: description: Launch Configuration kernel to use returned: when Launch Configuration was found sample: '' type: string keyname: description: Launch Configuration ssh key returned: when Launch Configuration was found sample: mykey type: string name: description: Name of the Launch Configuration returned: when Launch Configuration was found sample: myapp-v123 type: string ram_disk_id: description: Launch Configuration ram disk property returned: when Launch Configuration was found sample: '' type: string security_groups: description: Launch Configuration security groups returned: when Launch Configuration was found sample: [] type: list user_data: description: User data used to start instance returned: when Launch Configuration was found sample: ZXhwb3J0IENMT1VE type: string