簡體   English   中英

用於安裝 exe 文件的 windows cmd "start" 的 Ansible 錯誤

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM