通过 Salt Master 使用 ROBOCOPY
Using ROBOCOPY through Salt Master
我设置了 SLS 文件以将内容从网络文件夹复制到 minion 上的本地目录。
看起来有点像这样:
命令测试:
cmd.run:
- 姓名:'ROBOCOPY \\CygwinSource C:\CygwinSource /E'
并获得以下输出:
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Tuesday, December 6, 2016 10:50:35 AM
2016/12/06 10:50:35 ERROR 1808 (0x00000710) Getting File System Type of Source \<Server>\<program>\<file>\
The account used is a computer account. Use your global user account or local user account to access this server.
Source - \<Server>\<program>\<folder>\
Dest : C:\<path>\<folder>\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DATS /PURGE /MIR /NP /R:1 /W:1
------------------------------------------------------------------------------
NOTE : NTFS Security may not be copied - Source may not be NTFS.
2016/12/06 10:50:35 ERROR 1808 (0x00000710) Accessing Source Directory \<Server>\<program>\<file>\
The account used is a computer account. Use your global user account or local user account to access this server.
Waiting 1 seconds... Retrying...
当我 运行 在命令行中本地执行与 'ROBOCOPY \\CygwinSource C:\CygwinSource /E' 相同的操作时,它运行良好。我不知道如何解决 Robocopy 在通过 salt 使用它时似乎给出的 'use local user account'。
我也尝试添加 /MIR 和 /SEC,但没有用。
运行Windows10、小黄人2016.3.3
硕士:红帽,2016.3.3
Salt 似乎正在使用计算机帐户连接到网络资源。一些可能的解决方案:
- 尝试将客户端上的 Salt 服务(如果这就是 salt 执行命令的方式)更改为域用户 运行。
- 尝试使用盐文件服务器
- 在创建计划任务的地方实施这个 hacky 变通方法 - 在似乎与您的问题相关的 github 问题中讨论:https://github.com/saltstack/salt/issues/16340
我设置了 SLS 文件以将内容从网络文件夹复制到 minion 上的本地目录。
看起来有点像这样: 命令测试: cmd.run: - 姓名:'ROBOCOPY \\CygwinSource C:\CygwinSource /E'
并获得以下输出:
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Tuesday, December 6, 2016 10:50:35 AM
2016/12/06 10:50:35 ERROR 1808 (0x00000710) Getting File System Type of Source \<Server>\<program>\<file>\
The account used is a computer account. Use your global user account or local user account to access this server.
Source - \<Server>\<program>\<folder>\
Dest : C:\<path>\<folder>\
Files : *.*
Options : *.* /S /E /DCOPY:DA /COPY:DATS /PURGE /MIR /NP /R:1 /W:1
------------------------------------------------------------------------------
NOTE : NTFS Security may not be copied - Source may not be NTFS.
2016/12/06 10:50:35 ERROR 1808 (0x00000710) Accessing Source Directory \<Server>\<program>\<file>\
The account used is a computer account. Use your global user account or local user account to access this server.
Waiting 1 seconds... Retrying...
当我 运行 在命令行中本地执行与 'ROBOCOPY \\CygwinSource C:\CygwinSource /E' 相同的操作时,它运行良好。我不知道如何解决 Robocopy 在通过 salt 使用它时似乎给出的 'use local user account'。
我也尝试添加 /MIR 和 /SEC,但没有用。
运行Windows10、小黄人2016.3.3 硕士:红帽,2016.3.3
Salt 似乎正在使用计算机帐户连接到网络资源。一些可能的解决方案:
- 尝试将客户端上的 Salt 服务(如果这就是 salt 执行命令的方式)更改为域用户 运行。
- 尝试使用盐文件服务器
- 在创建计划任务的地方实施这个 hacky 变通方法 - 在似乎与您的问题相关的 github 问题中讨论:https://github.com/saltstack/salt/issues/16340