Hii, while discussing workarounds for issues with https://galaxy.ansible.com, I came across some inconsistencies wrt git tags. Collections below Ansible Collections · GitHub seem to randomly tag versions with, or without a v
prefix.
For example, Releases · ansible-collections/ansible.posix · GitHub tags version with the v
prefix. While for example Releases · ansible-collections/ansible.netcommon · GitHub tags versions without it.
If the version tags where consistent across all collections, then devising a workaround would be simpler as one wouldn’t have to add logic to cater for two possible permutations of the tag.
It may just be my OCD but on the other hand it seems like a simple thing (technically, at least) to do… I don’t have a pref for either format, as long as it’s consistent
For background info, I was hoping to convert a standard requirements file that uses the default Galaxy API:
collections:
- name: amazon.aws
source: https://galaxy.ansible.com
version: 7.6.1
- name: ansible.netcommon
source: https://galaxy.ansible.com
version: 5.3.0
- name: ansible.posix
source: https://galaxy.ansible.com
version: 1.5.4
- name: ansible.utils
source: https://galaxy.ansible.com
version: 2.12.0
- name: community.aws
source: https://galaxy.ansible.com
version: 7.2.0
- name: community.crypto
source: https://galaxy.ansible.com
version: 2.22.0
- name: community.docker
source: https://galaxy.ansible.com
version: 3.12.1
- name: community.general
source: https://galaxy.ansible.com
version: 8.6.5
- name: community.postgresql
source: https://galaxy.ansible.com
version: 3.9.0
- name: amazon.cloud
source: https://galaxy.ansible.com
version: 0.4.0
To it’s “github equivalent” workaround version, with
yq -ry '{collections:.collections|map("git+https://github.com/ansible-collections/"+.name+","+.version)}'
:
collections:
- git+https://github.com/ansible-collections/amazon.aws,7.6.1
- git+https://github.com/ansible-collections/ansible.netcommon,5.3.0
- git+https://github.com/ansible-collections/ansible.posix,1.5.4
- git+https://github.com/ansible-collections/ansible.utils,2.12.0
- git+https://github.com/ansible-collections/community.aws,7.2.0
- git+https://github.com/ansible-collections/community.crypto,2.22.0
- git+https://github.com/ansible-collections/community.docker,3.12.1
- git+https://github.com/ansible-collections/community.general,8.6.5
- git+https://github.com/ansible-collections/community.postgresql,3.9.0
- git+https://github.com/ansible-collections/amazon.cloud,0.4.0
If it weren’t for the randomly tagged repos…