mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +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):
|
except (IOError, OSError):
|
||||||
msg = 'Unable to write to cache file {0}. Check permissions.'
|
msg = 'Unable to write to cache file {0}. Check permissions.'
|
||||||
log.error(msg.format(fn_))
|
log.error(msg.format(fn_))
|
||||||
# Sync the grains
|
if not __opts__.get('local', False):
|
||||||
__salt__['saltutil.sync_grains']()
|
# Sync the grains
|
||||||
|
__salt__['saltutil.sync_grains']()
|
||||||
# Return the grains we just set to confirm everything was OK
|
# Return the grains we just set to confirm everything was OK
|
||||||
return new_grains
|
return new_grains
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user