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
This commit is contained in:
Sloane Hertel 2018-08-24 13:04:15 -04:00 committed by GitHub
parent b03feb6d40
commit d3f5238c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -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.

View file

@ -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'),