mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Don't stacktrace if invalid credentials are passed to boto_route53 state
This commit is contained in:
parent
36dc12c62c
commit
11c475b0ad
@ -71,6 +71,8 @@ passed in as a dict, or as a string to pull from pillars or minion config:
|
|||||||
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
|
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# Import Salt Libs
|
||||||
|
from salt.utils import SaltInvocationError
|
||||||
|
|
||||||
def __virtual__():
|
def __virtual__():
|
||||||
'''
|
'''
|
||||||
@ -144,10 +146,15 @@ def present(
|
|||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
value = ','.join(value)
|
value = ','.join(value)
|
||||||
|
|
||||||
record = __salt__['boto_route53.get_record'](name, zone, record_type,
|
try:
|
||||||
False, region, key, keyid,
|
record = __salt__['boto_route53.get_record'](name, zone, record_type,
|
||||||
profile, split_dns,
|
False, region, key, keyid,
|
||||||
private_zone)
|
profile, split_dns,
|
||||||
|
private_zone)
|
||||||
|
except SaltInvocationError as err:
|
||||||
|
ret['comment'] = 'Error: {0}'.format(err)
|
||||||
|
ret['result'] = False
|
||||||
|
return ret
|
||||||
|
|
||||||
if isinstance(record, dict) and not record:
|
if isinstance(record, dict) and not record:
|
||||||
if __opts__['test']:
|
if __opts__['test']:
|
||||||
|
Loading…
Reference in New Issue
Block a user