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

fix version in galaxy parameters to allow usage via git

Open ikke-t opened this issue 3 years ago • 5 comments

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

ikke-t avatar Mar 30 '22 11:03 ikke-t

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.

rjeffman avatar Mar 30 '22 18:03 rjeffman

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.

t-woerner avatar Mar 31 '22 13:03 t-woerner

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

t-woerner avatar Apr 18 '22 14:04 t-woerner

Hmm. To bad that https://github.com/ansible/ansible/issues/77553 got closed by ansibot

Is there an alternative plan?

keestux avatar Jul 05 '23 14:07 keestux

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

rjeffman avatar Jul 05 '23 14:07 rjeffman