mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +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
@ -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…
Reference in New Issue
Block a user