mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
add NoneType check.
This commit is contained in:
parent
3722bebb1d
commit
c1c32c75ac
1 changed files with 5 additions and 4 deletions
|
@ -300,10 +300,11 @@ def main():
|
|||
elb_man = ElbManager(module, instance_id, ec2_elbs, aws_access_key,
|
||||
aws_secret_key, region=region)
|
||||
|
||||
for elb in ec2_elbs:
|
||||
if not elb_man.exists(elb):
|
||||
msg="ELB %s does not exist" % elb
|
||||
module.fail_json(msg=msg)
|
||||
if ec2_elbs is not None:
|
||||
for elb in ec2_elbs:
|
||||
if not elb_man.exists(elb):
|
||||
msg="ELB %s does not exist" % elb
|
||||
module.fail_json(msg=msg)
|
||||
|
||||
if module.params['state'] == 'present':
|
||||
elb_man.register(wait, enable_availability_zone)
|
||||
|
|
Loading…
Reference in a new issue