??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
ßUdac @ sø i d d 6d g d 6d d 6Z d Z d Z d Z d d
l Z d d l m Z m Z m Z m Z m
Z
m Z m Z m
Z
d d l m Z d d
l m Z y d d
l Z Wn e k
r¹ n Xd „ Z d „ Z d „ Z d „ Z e d k rô e ƒ n d
S( s 1.1t metadata_versiont stableinterfacet statust communityt supported_bys×
---
module: ec2_lc
short_description: Create or delete AWS Autoscaling Launch Configurations
description:
- Can create or delete AWS Autoscaling Configurations
- Works with the ec2_asg module to manage Autoscaling Groups
notes:
- Amazon ASG Autoscaling Launch Configurations are immutable once created, so modifying the configuration after it is changed will not modify the
launch configuration on AWS. You must create a new config and assign it to the ASG instead.
- encrypted volumes are supported on versions >= 2.4
version_added: "1.6"
author:
- "Gareth Rushgrove (@garethr)"
- "Willem van Ketwich (@wilvk)"
options:
state:
description:
- Register or deregister the instance
default: present
choices: ['present', 'absent']
name:
description:
- Unique name for configuration
required: true
instance_type:
description:
- Instance type to use for the instance
required: true
image_id:
description:
- The AMI unique identifier to be used for the group
key_name:
description:
- The SSH key name to be used for access to managed instances
security_groups:
description:
- A list of security groups to apply to the instances. Since version 2.4 you can specify either security group names or IDs or a mix. Previous
to 2.4, for VPC instances, specify security group IDs and for EC2-Classic, specify either security group names or IDs.
volumes:
description:
- A list of volume dicts, each containing device name and optionally ephemeral id or snapshot id. Size and type (and number of iops for io
device type) must be specified for a new volume or a root volume, and may be passed for a snapshot volume. For any volume, a volume size less
than 1 will be interpreted as a request not to create the volume.
user_data:
description:
- Opaque blob of data which is made available to the ec2 instance. Mutually exclusive with I(user_data_path).
user_data_path:
description:
- Path to the file that contains userdata for the ec2 instances. Mutually exclusive with I(user_data).
version_added: "2.3"
kernel_id:
description:
- Kernel id for the EC2 instance
spot_price:
description:
- The spot price you are bidding. Only applies for an autoscaling group with spot instances.
instance_monitoring:
description:
- Specifies whether instances are launched with detailed monitoring.
type: bool
default: 'no'
assign_public_ip:
description:
- Used for Auto Scaling groups that launch instances into an Amazon Virtual Private Cloud. Specifies whether to assign a public IP address
to each instance launched in a Amazon VPC.
version_added: "1.8"
ramdisk_id:
description:
- A RAM disk id for the instances.
version_added: "1.8"
instance_profile_name:
description:
- The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instances.
version_added: "1.8"
ebs_optimized:
description:
- Specifies whether the instance is optimized for EBS I/O (true) or not (false).
default: false
version_added: "1.8"
classic_link_vpc_id:
description:
- Id of ClassicLink enabled VPC
version_added: "2.0"
classic_link_vpc_security_groups:
description:
- A list of security group IDs with which to associate the ClassicLink VPC instances.
version_added: "2.0"
vpc_id:
description:
- VPC ID, used when resolving security group names to IDs.
version_added: "2.4"
instance_id:
description:
- The Id of a running instance to use as a basis for a launch configuration. Can be used in place of image_id and instance_type.
version_added: "2.4"
placement_tenancy:
description:
- Determines whether the instance runs on single-tenant hardware or not.
default: 'default'
version_added: "2.4"
extends_documentation_fragment:
- aws
- ec2
requirements:
- boto3 >= 1.4.4
s‰
# create a launch configuration using an AMI image and instance type as a basis
- name: note that encrypted volumes are only supported in >= Ansible 2.4
ec2_lc:
name: special
image_id: ami-XXX
key_name: default
security_groups: ['group', 'group2' ]
instance_type: t1.micro
volumes:
- device_name: /dev/sda1
volume_size: 100
volume_type: io1
iops: 3000
delete_on_termination: true
encrypted: true
- device_name: /dev/sdb
ephemeral: ephemeral0
# create a launch configuration using a running instance id as a basis
- ec2_lc:
name: special
instance_id: i-00a48b207ec59e948
key_name: default
security_groups: ['launch-wizard-2' ]
volumes:
- device_name: /dev/sda1
volume_size: 120
volume_type: io1
iops: 3000
delete_on_termination: true
# create a launch configuration to omit the /dev/sdf EBS device that is included in the AMI image
- ec2_lc:
name: special
image_id: ami-XXX
key_name: default
security_groups: ['group', 'group2' ]
instance_type: t1.micro
volumes:
- device_name: /dev/sdf
no_device: true
sµ
arn:
description: The Amazon Resource Name of the launch configuration.
returned: when I(state=present)
type: str
sample: arn:aws:autoscaling:us-east-1:148830907657:launchConfiguration:888d9b58-d93a-40c4-90cf-759197a2621a:launchConfigurationName/launch_config_name
changed:
description: Whether the state of the launch configuration has changed.
returned: always
type: bool
sample: false
created_time:
description: The creation date and time for the launch configuration.
returned: when I(state=present)
type: str
sample: '2017-11-03 23:46:44.841000'
image_id:
description: The ID of the Amazon Machine Image used by the launch configuration.
returned: when I(state=present)
type: str
sample: ami-9be6f38c
instance_type:
description: The instance type for the instances.
returned: when I(state=present)
type: str
sample: t1.micro
name:
description: The name of the launch configuration.
returned: when I(state=present)
type: str
sample: launch_config_name
result:
description: The specification details for the launch configuration.
returned: when I(state=present)
type: complex
contains:
PlacementTenancy:
description: The tenancy of the instances, either default or dedicated.
returned: when I(state=present)
type: str
sample: default
associate_public_ip_address:
description: (EC2-VPC) Indicates whether to assign a public IP address to each instance.
returned: when I(state=present)
type: NoneType
sample: null
block_device_mappings:
description: A block device mapping, which specifies the block devices.
returned: when I(state=present)
type: complex
contains:
device_name:
description: The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
returned: when I(state=present)
type: str
sample: /dev/sda1
ebs:
description: The information about the Amazon EBS volume.
returned: when I(state=present)
type: complex
contains:
snapshot_id:
description: The ID of the snapshot.
returned: when I(state=present)
type: NoneType
sample: null
volume_size:
description: The volume size, in GiB.
returned: when I(state=present)
type: str
sample: '100'
virtual_name:
description: The name of the virtual device (for example, ephemeral0).
returned: when I(state=present)
type: NoneType
sample: null
classic_link_vpc_id:
description: The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
returned: when I(state=present)
type: NoneType
sample: null
classic_link_vpc_security_groups:
description: The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId.
returned: when I(state=present)
type: list
sample: []
created_time:
description: The creation date and time for the launch configuration.
returned: when I(state=present)
type: str
sample: '2017-11-03 23:46:44.841000'
delete_on_termination:
description: Indicates whether the volume is deleted on instance termination.
returned: when I(state=present)
type: bool
sample: true
ebs_optimized:
description: Indicates whether the instance is optimized for EBS I/O (true) or not (false).
returned: when I(state=present)
type: bool
sample: false
image_id:
description: The ID of the Amazon Machine Image used by the launch configuration.
returned: when I(state=present)
type: str
sample: ami-9be6f38c
instance_monitoring:
description: Indicates whether instances in this group are launched with detailed (true) or basic (false) monitoring.
returned: when I(state=present)
type: bool
sample: true
instance_profile_name:
description: The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
returned: when I(state=present)
type: str
sample: null
instance_type:
description: The instance type for the instances.
returned: when I(state=present)
type: str
sample: t1.micro
iops:
description: The number of I/O operations per second (IOPS) to provision for the volume.
returned: when I(state=present)
type: NoneType
sample: null
kernel_id:
description: The ID of the kernel associated with the AMI.
returned: when I(state=present)
type: str
sample: ''
key_name:
description: The name of the key pair.
returned: when I(state=present)
type: str
sample: testkey
launch_configuration_arn:
description: The Amazon Resource Name (ARN) of the launch configuration.
returned: when I(state=present)
type: str
sample: arn:aws:autoscaling:us-east-1:148830907657:launchConfiguration:888d9b58-d93a-40c4-90cf-759197a2621a:launchConfigurationName/launch_config_name
member:
description: ""
returned: when I(state=present)
type: str
sample: "
"
name:
description: The name of the launch configuration.
returned: when I(state=present)
type: str
sample: launch_config_name
ramdisk_id:
description: The ID of the RAM disk associated with the AMI.
returned: when I(state=present)
type: str
sample: ''
security_groups:
description: The security groups to associate with the instances.
returned: when I(state=present)
type: list
sample:
- sg-5e27db2f
spot_price:
description: The price to bid when launching Spot Instances.
returned: when I(state=present)
type: NoneType
sample: null
use_block_device_types:
description: Indicates whether to suppress a device mapping.
returned: when I(state=present)
type: bool
sample: false
user_data:
description: The user data available to the instances.
returned: when I(state=present)
type: str
sample: ''
volume_type:
description: The volume type (one of standard, io1, gp2).
returned: when I(state=present)
type: NoneType
sample: null
security_groups:
description: The security groups to associate with the instances.
returned: when I(state=present)
type: list
sample:
- sg-5e27db2f
iÿÿÿÿN( t get_aws_connection_infot ec2_argument_spect ec2_connectt camel_dict_to_snake_dictt% get_ec2_security_group_ids_from_namest
boto3_connt snake_dict_to_camel_dictt HAS_BOTO3( t to_text( t
AnsibleModulec sR d ˆ k rF d ˆ k rF d ˆ k rF d ˆ k rF | j d d ƒ qF n d ˆ k r‰ ˆ j d ƒ d k r‰ d ˆ k r‰ | j d d
ƒ q‰ n d ˆ k r· d ˆ k r· | j d d ƒ q· n i } d ˆ k rß ˆ j d ƒ | d