繁体   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