ansible-freeipa icon indicating copy to clipboard operation
ansible-freeipa copied to clipboard

Invalid version tag in galaxy.yml

Open a-haurylau opened this issue 1 year ago • 3 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?

a-haurylau avatar Jan 17 '24 16:01 a-haurylau

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.

t-woerner avatar Jan 21 '24 11:01 t-woerner

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.

a-haurylau avatar Jan 22 '24 09:01 a-haurylau

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

t-woerner avatar Jan 22 '24 14:01 t-woerner