簡體   English   中英

在需求中指定版本時,ansible-galaxy安裝失敗

[英]ansible-galaxy install fails when specifying a version in requirements

不確定這是否是ansible-galaxy的錯誤,但我正在嘗試從requirements.yml文件( 相關的ansible文檔 )安裝角色。其中一個角色是從git中提取的,具有如下特定version

requirements.yml

---
- src:  https://github.com/thom-nic/ansible-shell
  name: thom-nic.shell
  version: develop

當我運行ansible-galaxy install我得到以下輸出:

± ansible-galaxy install -r requirements.yml --force
- executing: git clone https://github.com/thom-nic/ansible-shell thom-nic.shell
- executing: git archive --prefix=thom-nic.shell/ --output=/var/folders/cw/9vh4w77n4vb_bchhsxnglrcm0000gn/T/tmpF4GAqD.tar develop
- command git archive --prefix=thom-nic.shell/ --output=/var/folders/cw/9vh4w77n4vb_bchhsxnglrcm0000gn/T/tmpF4GAqD.tar develop failed
  in directory /var/folders/cw/9vh4w77n4vb_bchhsxnglrcm0000gn/T/tmpIyYaJz
- thom-nic.shell was NOT installed successfully.

如果我將version更改為master則可以正常工作。 我已經在git repos中嘗試了其他角色,結果相同。

奇怪的是, ansible-galaxy本身似乎沒有--version輸出,但是ansible ansible --version報告v1.8.3。

這是一個眾所周知的問題 在此期間,作為解決方法,修改requirements.yml中的版本,如下所示:

---
- src:  https://github.com/thom-nic/ansible-shell
  name: thom-nic.shell
  version: remotes/origin/develop

暫無
暫無

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

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