Can't install via ansible-galaxy
okleinschmidt opened this issue · 2 comments
okleinschmidt commented
First of all, I am new to ansible, maybe I'm doing something wrong. When I try to install docker.ubuntu with ansible-galaxy I get the following error.
OS: macOS 10.13.4
Python: 3.6.5 (homebrew)
$ ansible-galaxy install angstwad.docker_ubuntu -p roles/ -vvvv
ansible-galaxy 2.4.3.0
config file = /Users/okl/src/gitea/ansible/ansible.cfg
configured module search path = ['/Users/okl/src/gitea/ansible/plugins/modules', '/usr/share/ansible']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible-galaxy
python version = 3.6.5 (default, Mar 30 2018, 06:41:53) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
Using /Users/okl/src/gitea/ansible/ansible.cfg as config file
Opened /Users/okl/.ansible_galaxy
Processing role angstwad.docker_ubuntu
Opened /Users/okl/.ansible_galaxy
Initial connection to galaxy_server: https://galaxy.ansible.com
Base API: https://galaxy.ansible.com/api/v1
- downloading role 'docker_ubuntu', owned by angstwad
https://galaxy.ansible.com/api/v1/roles/?owner__username=angstwad&name=docker_ubuntu
https://galaxy.ansible.com/api/v1/roles/292/versions/?page_size=50
ERROR! Unexpected Exception, this is probably a bug: '<' not supported between instances of 'int' and 'str'
the full traceback was:
Traceback (most recent call last):
File "/usr/local/bin/ansible-galaxy", line 106, in <module>
exit_code = cli.run()
File "/usr/local/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 150, in run
self.execute()
File "/usr/local/lib/python3.6/site-packages/ansible/cli/__init__.py", line 155, in execute
fn()
File "/usr/local/lib/python3.6/site-packages/ansible/cli/galaxy.py", line 393, in execute_install
installed = role.install()
File "/usr/local/lib/python3.6/site-packages/ansible/galaxy/role.py", line 236, in install
loose_versions.sort()
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/version.py", line 337, in _cmp
if self.version < other.version:
TypeError: '<' not supported between instances of 'int' and 'str'
angstwad commented
It's because you're using Python 3.6 and because my release versions get compared as str
because I have a v
in the version, like v3.x.x
. You can either git clone or use Python 2 for now.
angstwad commented
Oh, BTW, I definitely want to re-tag the entire repo without the v
in the tags, but it's enough work that I just haven't found the time to do it. I'd gladly take a script from the community that re-tags the whole thing.