ec2_lc_find - Find AWS Autoscaling Launch Configurations
New in version 2.2.
Synopsis
- 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)
Requirements (on host that executes module)
- python >= 2.6
- boto3
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
limit |
no |
How many results to show.
Corresponds to Python slice notation like list[:limit].
|
||
name_regex |
yes |
A Launch Configuration to match
It'll be compiled as regex
|
||
region |
yes |
The AWS region to use.
aliases: aws_region, ec2_region
|
||
sort_order |
no | ascending |
|
Order in which to sort results.
|
Examples
# 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
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
arn |
Name of the AMI
|
when Launch Configuration was found | string | arn:aws:autoscaling:eu-west-1:12345:launchConfiguration:d82f050e-e315:launchConfigurationName/yourproject |
associate_public_address |
Assign public address or not
|
when Launch Configuration was found | boolean | True |
block_device_mappings |
Launch Configuration block device mappings property
|
when Launch Configuration was found | list | [] |
classic_link_vpc_security_groups |
Launch Configuration classic link vpc security groups property
|
when Launch Configuration was found | list | [] |
created_time |
When it was created
|
when Launch Configuration was found | string | 2016-06-29T14:59:22.222000+00:00 |
ebs_optimized |
Launch Configuration EBS optimized property
|
when Launch Configuration was found | boolean | False |
image_id |
AMI id
|
when Launch Configuration was found | string | ami-0d75df7e |
instance_monitoring |
Launch Configuration instance monitoring property
|
when Launch Configuration was found | string | {'Enabled': False} |
instance_type |
Type of ec2 instance
|
when Launch Configuration was found | string | t2.small |
kernel_id |
Launch Configuration kernel to use
|
when Launch Configuration was found | string | |
keyname |
Launch Configuration ssh key
|
when Launch Configuration was found | string | mykey |
name |
Name of the Launch Configuration
|
when Launch Configuration was found | string | myapp-v123 |
ram_disk_id |
Launch Configuration ram disk property
|
when Launch Configuration was found | string | |
security_groups |
Launch Configuration security groups
|
when Launch Configuration was found | list | [] |
user_data |
User data used to start instance
|
when Launch Configuration was found | string | ZXhwb3J0IENMT1VE |
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/ec2_lc_find_module.html