INFRA-6108 - boto_elb.present() errors if test=True and ELB doesn't exist

This commit is contained in:
Tom Williams 2017-12-11 16:48:15 -05:00 committed by Jasper Lievisse Adriaanse
parent b6725536f8
commit 54cf591078
No known key found for this signature in database
GPG Key ID: 3C7E42C828FDBDB5

View File

@ -396,6 +396,9 @@ def present(name, listeners, availability_zones=None, subnets=None,
ret['result'] = ret['result'] if _ret['result'] else _ret['result']
if ret['result'] is False:
return ret
exists = __salt__['boto_elb.exists'](name, region, key, keyid, profile)
if not exists and __opts__['test']:
return ret
if attributes:
_ret = _attributes_present(name, attributes, region, key, keyid, profile)