mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix grains cache
Prior to this, custom grains were not being cached at all.
This commit is contained in:
parent
30e03a8b0c
commit
52716694f5
1 changed files with 1 additions and 1 deletions
|
@ -645,6 +645,7 @@ def grains(opts, force_refresh=False, proxy=None):
|
|||
continue
|
||||
grains_data.update(ret)
|
||||
|
||||
grains_data.update(opts['grains'])
|
||||
# Write cache if enabled
|
||||
if opts.get('grains_cache', False):
|
||||
cumask = os.umask(0o77)
|
||||
|
@ -664,7 +665,6 @@ def grains(opts, force_refresh=False, proxy=None):
|
|||
log.error(msg.format(cfn))
|
||||
os.umask(cumask)
|
||||
|
||||
grains_data.update(opts['grains'])
|
||||
return grains_data
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue