Adds support for public_ip boolean for launch configurations.
This commit is contained in:
parent
18059b39d7
commit
efbf3cfd69
1 changed files with 11 additions and 1 deletions
12
cloud/ec2_lc
12
cloud/ec2_lc
|
@ -79,6 +79,13 @@ options:
|
|||
required: false
|
||||
default: false
|
||||
aliases: []
|
||||
assign_public_ip:
|
||||
description:
|
||||
- whether instances in group are launched with a public IP.
|
||||
required: false
|
||||
default: false
|
||||
aliases: []
|
||||
version_added: "1.8"
|
||||
extends_documentation_fragment: aws
|
||||
"""
|
||||
|
||||
|
@ -139,6 +146,7 @@ def create_launch_config(connection, module):
|
|||
instance_type = module.params.get('instance_type')
|
||||
spot_price = module.params.get('spot_price')
|
||||
instance_monitoring = module.params.get('instance_monitoring')
|
||||
assign_public_ip = module.params.get('assign_public_ip')
|
||||
bdm = BlockDeviceMapping()
|
||||
|
||||
if volumes:
|
||||
|
@ -159,7 +167,8 @@ def create_launch_config(connection, module):
|
|||
block_device_mappings=[bdm],
|
||||
instance_type=instance_type,
|
||||
spot_price=spot_price,
|
||||
instance_monitoring=instance_monitoring)
|
||||
instance_monitoring=instance_monitoring,
|
||||
associate_public_ip_address = assign_public_ip )
|
||||
|
||||
launch_configs = connection.get_all_launch_configurations(names=[name])
|
||||
changed = False
|
||||
|
@ -201,6 +210,7 @@ def main():
|
|||
state=dict(default='present', choices=['present', 'absent']),
|
||||
spot_price=dict(type='float'),
|
||||
instance_monitoring=dict(default=False, type='bool'),
|
||||
assign_public_ip=dict(default=False, type='bool')
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue