Fix dangerous elb_application_lb state (#44646)

* elb_application_lb: fix dangerous default of deleting an ELB if state is omitted by changing state to default to present to be more like other AWS modules
pull/44648/head
Sloane Hertel 6 years ago committed by GitHub
parent b03feb6d40
commit d3f5238c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,4 @@
---
bugfixes:
- elb_application_lb - Fix a dangerous behavior of deleting an ELB if state was omitted from the task.
Now state defaults to 'present', which is typical throughout AWS modules.

@ -102,7 +102,7 @@ options:
state: state:
description: description:
- Create or destroy the load balancer. - Create or destroy the load balancer.
required: true default: present
choices: [ 'present', 'absent' ] choices: [ 'present', 'absent' ]
tags: tags:
description: description:
@ -528,7 +528,7 @@ def main():
subnets=dict(type='list'), subnets=dict(type='list'),
security_groups=dict(type='list'), security_groups=dict(type='list'),
scheme=dict(default='internet-facing', choices=['internet-facing', 'internal']), scheme=dict(default='internet-facing', choices=['internet-facing', 'internal']),
state=dict(choices=['present', 'absent'], type='str'), state=dict(choices=['present', 'absent'], default='present'),
tags=dict(type='dict'), tags=dict(type='dict'),
wait_timeout=dict(type='int'), wait_timeout=dict(type='int'),
wait=dict(default=False, type='bool'), wait=dict(default=False, type='bool'),

Loading…
Cancel
Save