mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Do not sync grains in grains.setval when using local mode
This commit is contained in:
parent
8a8d8883c6
commit
8e2a9f886c
@ -237,8 +237,9 @@ def setvals(grains, destructive=False):
|
||||
except (IOError, OSError):
|
||||
msg = 'Unable to write to cache file {0}. Check permissions.'
|
||||
log.error(msg.format(fn_))
|
||||
# Sync the grains
|
||||
__salt__['saltutil.sync_grains']()
|
||||
if not __opts__.get('local', False):
|
||||
# Sync the grains
|
||||
__salt__['saltutil.sync_grains']()
|
||||
# Return the grains we just set to confirm everything was OK
|
||||
return new_grains
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user