【问题标题】:ansible-galaxy install fails when specifying a version in requirements在需求中指定版本时,ansible-galaxy 安装失败
【发布时间】:2015-03-04 19:47:02
【问题描述】:

不确定这是否是 ansible-galaxy 中的错误,但我正在尝试从 requirements.yml 文件 (related ansible documentation) 安装角色。其中一个角色正在从 git 中提取,具有特定的 @987654323 @像这样:

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。

【问题讨论】:

    标签: ansible ansible-galaxy


    【解决方案1】:

    这是一个known issue。同时,作为一种变通方法,修改 requirements.yml 中的版本,如下所示:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-25
      • 1970-01-01
      • 2017-04-26
      • 2020-02-20
      • 2016-10-25
      • 2023-02-02
      相关资源
      最近更新 更多