mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
commit
d1a1a594e9
1 changed files with 1 additions and 10 deletions
|
@ -236,16 +236,7 @@ def get_grains():
|
|||
'''
|
||||
Retrieve facts from the network device.
|
||||
'''
|
||||
refresh_needed = False
|
||||
refresh_needed = refresh_needed or (not DETAILS.get('grains_cache', {}))
|
||||
refresh_needed = refresh_needed or (not DETAILS.get('grains_cache', {}).get('result', False))
|
||||
refresh_needed = refresh_needed or (not DETAILS.get('grains_cache', {}).get('out', {}))
|
||||
|
||||
if refresh_needed:
|
||||
facts = call('get_facts', **{})
|
||||
DETAILS['grains_cache'] = facts
|
||||
|
||||
return DETAILS.get('grains_cache', {})
|
||||
return call('get_facts', **{})
|
||||
|
||||
|
||||
def grains_refresh():
|
||||
|
|
Loading…
Add table
Reference in a new issue