mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix file serialize on windows
This fixes the file.serialize state on windows. Currently, it fails on the first run (with "Failed to change group to Administrators" and succeeds on runs afterwards.
This commit is contained in:
parent
7d51d8bb46
commit
071a675f8a
1 changed files with 8 additions and 0 deletions
|
@ -4243,6 +4243,14 @@ def serialize(name,
|
|||
return _error(
|
||||
ret, 'Neither \'dataset\' nor \'dataset_pillar\' was defined')
|
||||
|
||||
if salt.utils.is_windows():
|
||||
if group is not None:
|
||||
log.warning(
|
||||
'The group argument for {0} has been ignored as this '
|
||||
'is a Windows system.'.format(name)
|
||||
)
|
||||
group = user
|
||||
|
||||
if merge_if_exists:
|
||||
if os.path.isfile(name):
|
||||
if formatter == 'yaml':
|
||||
|
|
Loading…
Add table
Reference in a new issue