mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #30644 from tbaker57/another_go_at_30573
Another go at fixing 30573
This commit is contained in:
commit
30e03a8b0c
@ -147,7 +147,7 @@ def get_elb_config(name, region=None, key=None, keyid=None, profile=None):
|
||||
return ret
|
||||
except boto.exception.BotoServerError as error:
|
||||
log.debug(error)
|
||||
return []
|
||||
return {}
|
||||
|
||||
|
||||
def create(name, availability_zones, listeners=None, subnets=None,
|
||||
|
@ -334,26 +334,27 @@ def present(
|
||||
lb = __salt__['boto_elb.get_elb_config'](
|
||||
name, region, key, keyid, profile
|
||||
)
|
||||
for cname in cnames:
|
||||
_ret = __states__['boto_route53.present'](
|
||||
name=cname.get('name'),
|
||||
value=lb['dns_name'],
|
||||
zone=cname.get('zone'),
|
||||
record_type='CNAME',
|
||||
identifier=cname.get('identifier', None),
|
||||
ttl=cname.get('ttl', None),
|
||||
region=region,
|
||||
key=key,
|
||||
keyid=keyid,
|
||||
profile=profile,
|
||||
wait_for_sync=wait_for_sync
|
||||
)
|
||||
ret['changes'] = dictupdate.update(ret['changes'], _ret['changes'])
|
||||
ret['comment'] = ' '.join([ret['comment'], _ret['comment']])
|
||||
if not _ret['result']:
|
||||
ret['result'] = _ret['result']
|
||||
if ret['result'] is False:
|
||||
return ret
|
||||
if len(lb) > 0:
|
||||
for cname in cnames:
|
||||
_ret = __states__['boto_route53.present'](
|
||||
name=cname.get('name'),
|
||||
value=lb['dns_name'],
|
||||
zone=cname.get('zone'),
|
||||
record_type='CNAME',
|
||||
identifier=cname.get('identifier', None),
|
||||
ttl=cname.get('ttl', None),
|
||||
region=region,
|
||||
key=key,
|
||||
keyid=keyid,
|
||||
profile=profile,
|
||||
wait_for_sync=wait_for_sync
|
||||
)
|
||||
ret['changes'] = dictupdate.update(ret['changes'], _ret['changes'])
|
||||
ret['comment'] = ' '.join([ret['comment'], _ret['comment']])
|
||||
if not _ret['result']:
|
||||
ret['result'] = _ret['result']
|
||||
if ret['result'] is False:
|
||||
return ret
|
||||
_ret = _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profile)
|
||||
ret['changes'] = dictupdate.update(ret['changes'], _ret['changes'])
|
||||
ret['comment'] = ' '.join([ret['comment'], _ret['comment']])
|
||||
|
Loading…
Reference in New Issue
Block a user