ansible-freeipa
ansible-freeipa copied to clipboard
fix version in galaxy parameters to allow usage via git
ansible-galaxy fails downloading the collection from git as the version is not set properly in galaxy.yml
As the galaxy version lags behind, I tried getting the collection from github. I had it like this in my requirements.yml:
collections:
- name: freeipa.ansible_freeipa
type: git
source: https://github.com/freeipa/ansible-freeipa.git
version: v1.6.3
and running ansible-galaxy collection install fails:
Process install dependency map
Cloning into '/home/runner/.ansible/tmp/ansible-local-43oi3e2utt/tmp05nis2p2/ansible-freeipaknsdyclk'...
remote: Enumerating objects: 11431, done.
remote: Counting objects: 100% (853/853), done.
remote: Compressing objects: 100% (576/576), done.
remote: Total 11431 (delta 523), reused 468 (delta 257), pack-reused 10578
Receiving objects: 100% (11431/11431), 2.77 MiB | 8.88 MiB/s, done.
Resolving deltas: 100% (7555/7555), done.
Note: switching to 'v1.6.3'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4aab159 Merge pull request #753 from t-woerner/group_test_fix_services
ERROR! Unexpected Exception, this is probably a bug: invalid semantic version 'A.B.C'
to see the full traceback, use -vvv
Galaxy should have the same version as the latest release tag. It should not be necessary to use git.
There's a plan for a new release soon-ish, and Galaxy will get the new bits.
For the generation of the galaxy collection please use utils/build-galaxy-release.sh. This script is generating the collection. The script creates a temporary copy of all the needed files from the repo and updates the files with the proper collection name and prefix and finally creates the collection. These changes are needed to make sure that the collection is working as expected.
I created an issue for ansible to enable the use of a script to generate the collection from git repo: https://github.com/ansible/ansible/issues/77553
Hmm. To bad that https://github.com/ansible/ansible/issues/77553 got closed by ansibot
Is there an alternative plan?
Not for the near future.
In my opinion, it should be fixed on Ansible side (and it is annoying that they bot stale close issues that are waiting on them).