首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当在需求中指定版本时,ansible-galaxy安装失败。

当在需求中指定版本时,ansible-galaxy安装失败。
EN

Stack Overflow用户
提问于 2015-03-04 19:47:02
回答 1查看 1.3K关注 0票数 3

不确定这是否是ansible-galaxy中的错误,但我正在尝试从requirements.yml文件(相关的不可用文件)中安装角色。其中一个角色是从git中删除的,其中有一个特定的version,如下所示:

requirements.yml

代码语言:javascript
复制
---
- src:  https://github.com/thom-nic/ansible-shell
  name: thom-nic.shell
  version: develop

当我运行ansible-galaxy install时,我得到以下输出:

代码语言:javascript
复制
± 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中尝试过其他角色,结果也是一样的。

奇怪的是,ansible-galaxy本身似乎没有--version输出,但是ansible --version报告了v1.8.3。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-03-04 19:55:26

这是一个已知问题。同时,作为解决办法,修改requirements.yml中的版本,如下所示:

代码语言:javascript
复制
---
- src:  https://github.com/thom-nic/ansible-shell
  name: thom-nic.shell
  version: remotes/origin/develop
票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28863504

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档