不知道这是否是中的错误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 --version
报告了v1.8.3。
这是一个已知问题。同时,作为一种解决方法,如下所示,在requirements.yml中修改版本:
---
- src: https://github.com/thom-nic/ansible-shell
name: thom-nic.shell
version: remotes/origin/develop
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句