Added termination_policies option

pull/18777/head
Bruno Galindro da Costa 9 years ago committed by Matt Clay
parent 6695cc5c21
commit 6f36629d13

@ -126,6 +126,13 @@ options:
version_added: "1.9" version_added: "1.9"
default: yes default: yes
required: False required: False
termination_policies:
description:
- An ordered list of criteria used for selecting instances to be removed from the Auto Scaling group when reducing capacity.
required: false
default: Default. E.g.: When used to create a new autoscaling group, the Default value is used. When used to change an existent autoscaling group, the current termination policies are mantained
choices: ['OldestInstance', 'NewestInstance', 'OldestLaunchConfiguration', 'ClosestToNextInstanceHour', 'Default']
version_added: "2.0"
extends_documentation_fragment: aws extends_documentation_fragment: aws
""" """
@ -421,7 +428,8 @@ def create_autoscaling_group(connection, module):
tags=asg_tags, tags=asg_tags,
health_check_period=health_check_period, health_check_period=health_check_period,
health_check_type=health_check_type, health_check_type=health_check_type,
default_cooldown=default_cooldown) default_cooldown=default_cooldown,
termination_policies=termination_policies)
try: try:
connection.create_auto_scaling_group(ag) connection.create_auto_scaling_group(ag)
@ -790,7 +798,8 @@ def main():
health_check_period=dict(type='int', default=300), health_check_period=dict(type='int', default=300),
health_check_type=dict(default='EC2', choices=['EC2', 'ELB']), health_check_type=dict(default='EC2', choices=['EC2', 'ELB']),
default_cooldown=dict(type='int', default=300), default_cooldown=dict(type='int', default=300),
wait_for_instances=dict(type='bool', default=True) wait_for_instances=dict(type='bool', default=True),
termination_policies=dict(type='list', default=None)
), ),
) )

Loading…
Cancel
Save