[英]Error while executing (.exe ) from windows command script (.cmd) file
[英]Ansible Error for windows cmd "start" for installing exe file
您好我正在嘗試在無法訪問互聯網的遠程 Windows 服務器上安裝 conda,因此我試圖將 exe 文件復制到服務器然后安裝。 在 Windows 中,我使用“開始”命令,但使用 ansible 我收到如下錯誤:
Could not find the file start.exe
我的 windows cmd 是:
start /wait "" \\projects\tools\anaconda3.exe /InstallType= AllUsers /AddToPath=1 /S /D=D:\anaconda
我的劇本:
- name : 'install anaconda'
win_command : 'start /wait "" \\projects\tools\anaconda3.exe /InstallType= AllUsers /AddToPath=1 /S /D=D:\anaconda'
args:
chdir: 'D:\'
如何讓 ansibe 識別“開始”
嘗試使用win_shell
並將cmd
指定為可執行文件:
- name : install anaconda
win_shell : start /wait anaconda3.exe /InstallType=AllUsers /AddToPath=1 /S /D=D:\anaconda
args:
chdir: D:\projects\tools\
executable: cmd
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.