mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
* use traverse_dict_and_list() in modules.config
This commit is contained in:
parent
b4ab86cfdc
commit
2daff27ea6
@ -224,16 +224,16 @@ def get(key, default=''):
|
|||||||
|
|
||||||
salt '*' config.get pkg:apache
|
salt '*' config.get pkg:apache
|
||||||
'''
|
'''
|
||||||
ret = salt.utils.traverse_dict(__opts__, key, '_|-')
|
ret = salt.utils.traverse_dict_and_list(__opts__, key, '_|-')
|
||||||
if ret != '_|-':
|
if ret != '_|-':
|
||||||
return ret
|
return ret
|
||||||
ret = salt.utils.traverse_dict(__grains__, key, '_|-')
|
ret = salt.utils.traverse_dict_and_list(__grains__, key, '_|-')
|
||||||
if ret != '_|-':
|
if ret != '_|-':
|
||||||
return ret
|
return ret
|
||||||
ret = salt.utils.traverse_dict(__pillar__, key, '_|-')
|
ret = salt.utils.traverse_dict_and_list(__pillar__, key, '_|-')
|
||||||
if ret != '_|-':
|
if ret != '_|-':
|
||||||
return ret
|
return ret
|
||||||
ret = salt.utils.traverse_dict(__pillar__.get('master', {}), key, '_|-')
|
ret = salt.utils.traverse_dict_and_list(__pillar__.get('master', {}), key, '_|-')
|
||||||
if ret != '_|-':
|
if ret != '_|-':
|
||||||
return ret
|
return ret
|
||||||
return default
|
return default
|
||||||
|
Loading…
Reference in New Issue
Block a user