[elb_target_group] fix docs and add default for wait_timeout - fixes #42324 (#42477)

Add default for wait_timeout and version_added flag
pull/42132/head
Sloane Hertel 6 years ago committed by Ryan Brown
parent a0748c0837
commit 2c3e6f8bd3

@ -130,6 +130,17 @@ options:
description:
- The identifier of the virtual private cloud (VPC). Required when I(state) is C(present).
required: false
wait:
description:
- Whether or not to wait for the target group.
type: bool
default: false
version_added: "2.4"
wait_timeout:
description:
- The time to wait for the target group.
default: 200
version_added: "2.4"
extends_documentation_fragment:
- aws
- ec2
@ -515,7 +526,7 @@ def create_or_update_target_group(connection, module):
if module.params.get("wait"):
status_achieved, registered_instances = wait_for_status(connection, module, tg['TargetGroupArn'], instances_to_add, 'healthy')
if not status_achieved:
module.fail_json(msg='Error waiting for target registration - please check the AWS console')
module.fail_json(msg='Error waiting for target registration to be healthy - please check the AWS console')
remove_instances = set(current_instance_ids) - set(new_instance_ids)
@ -578,7 +589,7 @@ def create_or_update_target_group(connection, module):
if module.params.get("wait"):
status_achieved, registered_instances = wait_for_status(connection, module, tg['TargetGroupArn'], params['Targets'], 'healthy')
if not status_achieved:
module.fail_json(msg='Error waiting for target registration - please check the AWS console')
module.fail_json(msg='Error waiting for target registration to be healthy - please check the AWS console')
# Now set target group attributes
update_attributes = []
@ -685,8 +696,8 @@ def main():
targets=dict(type='list'),
unhealthy_threshold_count=dict(type='int'),
vpc_id=dict(),
wait_timeout=dict(type='int'),
wait=dict(type='bool')
wait_timeout=dict(type='int', default=200),
wait=dict(type='bool', default=False)
)
)

@ -96,7 +96,6 @@ lib/ansible/modules/cloud/amazon/elb_application_lb.py E324
lib/ansible/modules/cloud/amazon/elb_classic_lb_facts.py E323
lib/ansible/modules/cloud/amazon/elb_instance.py E326
lib/ansible/modules/cloud/amazon/elb_target.py E327
lib/ansible/modules/cloud/amazon/elb_target_group.py E322
lib/ansible/modules/cloud/amazon/elb_target_group.py E324
lib/ansible/modules/cloud/amazon/elb_target_group.py E325
lib/ansible/modules/cloud/amazon/elb_target_group.py E326

Loading…
Cancel
Save