3

Not sure if this is a bug in ansible-galaxy, but I'm trying to install roles from a requirements.yml file (related ansible documentation.) One of those roles is being pulled from git, with a specific version like so:

requirements.yml:

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

When I run ansible-galaxy install I get the following output:

± 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.

If I change the version to master it works. I've tried this with other roles in git repos with the same result.

Oddly, ansible-galaxy itself doesn't seem to have a --version output however ansible --version reports v1.8.3.

sorin
  • 161,544
  • 178
  • 535
  • 806
thom_nic
  • 7,809
  • 6
  • 42
  • 43

1 Answers1

9

It's a known issue. In the meantime, as a workaround, modify the version in requirements.yml as shown below:

---
- src:  https://github.com/thom-nic/ansible-shell
  name: thom-nic.shell
  version: remotes/origin/develop
Lorin Hochstein
  • 57,372
  • 31
  • 105
  • 141