簡體   English   中英

Ansible Windows win_unzip 方法 System.IO.Compression.ZipFile 使用 3 個參數調用 ExtractToFile 的異常訪問路徑被拒絕

[英]Ansible Windows win_unzip Method System.IO.Compression.ZipFile Exception calling ExtractToFile with 3 argument Access to the path is denied

使用 :

  win_unzip:
        src: "D:\program64\my\app\binaries.zip"
        dest: "D:\program64\my\app\"
        delete_archive: yes

我明白了:

TASK [ Unzip zip file] ****************************
17:19:01            fatal: [myhost]: FAILED! => {"changed": true, "dest": "D:\program64\my\app\", "msg": 
"Error unzipping 'D:\program64\my\app\binaries.zip' to 'D:\program64\my\app\'!. Method: 
System.IO.Compression.ZipFile, Exception: Exception calling \"ExtractToFile\" with \"3\" argument(s): 
\"Access to the path 'D:\program64\my\app\my_app.exe' is denied.\"", "removed": false, "src": 
"D:\program64\my\app\binaries.zip"}

我檢查並沒有my_app.exe ,當我手動提取它時,它起作用了,我還檢查了它們是否正常的策略,我認為它與 Windows 的鏈接比 Ansible 的更多,但無法弄清楚原因和方式。

PS:使用 Kerberos 身份驗證手冊。

謝謝,

在我的情況下 src: 意外地是一個文件夾而不是一個文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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