freeipa / ansible-freeipa

Ansible roles and modules for FreeIPA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid version tag in galaxy.yml

a-haurylau opened this issue · comments

When trying to include collection from AWX with simple collections/requirements.yml

collections:
  - name: https://github.com/freeipa/ansible-freeipa.git
    type: git

We receive following:

Cloning into '/var/lib/awx/projects/.__awx_cache/_8__git_priv/stage/tmp/ansible-local-1152oteppbz/tmp12qngp4k/ansible-freeipax0zcv3rm'...
ERROR! Non integer values in LooseVersion ('A.B.C')

I suspect that its caused be following version: "A.B.C" in topdir galaxy.yml. Is it possible to match this to git version tag?

ansible-freeipa is using a script to create the collection from the repo: utils/build-galaxy-release.sh

This script is changing nearly all files (roles, modules, module_utils, playbooks, examples, readme files, tests and action group) in the repo to use the proper name space for Ansible galaxy or Ansible AutomationHub. The version A.B.C is used so that the automatic generation without the script will fail as the generated collection will not be useful without the modifications.

Hmm, but it means that in order to use this collection in some kind of automation systems (like AWX) following procedure should be performed:

  1. Clone collection with tag
  2. Run script to make necessary steps
  3. Push it back to some other public repo (or zip and upload to some public hosting).
  4. Use URL to modified collection from step 3 in AWX

I hoped that it will be done 'automagically' by using

collections:
  - name: https://github.com/freeipa/ansible-freeipa.git
    type: git
    version: v1.12.0

as with any other non-official collection.

The ansible-freeipa collection is officially available at Ansible galaxy and also Ansible AutomationHub.

On galaxy as freeipa.ansible_freeipa: https://galaxy.ansible.com/ui/repo/published/freeipa/ansible_freeipa/
On AutomationHub as redhat.rhel_idm