Define name for all collections in a-r-r

At the moment it's not possible to override collection, since we merge
user and default collections by name. So in case it's needed to
override git repo or user wants to use galaxy, they can only extend
installable collections. At the same time in envs with limited
connectivity it might be impossible to fetch data from third-party repos
and replacement is needed.

So to allow proper overrides we place collection name and source
keys regardless of type.

Change-Id: Ic0b125715527e4f3fba5238c3f7577e83c93e568
This commit is contained in:
Dmitriy Rabotyagov
2022-12-20 13:37:32 +01:00
parent 7f8f6327d0
commit e4b595d910
2 changed files with 28 additions and 15 deletions

View File

@@ -1,40 +1,52 @@
--- ---
collections: collections:
- name: https://opendev.org/openstack/ansible-collections-openstack - name: openstack.cloud
source: https://opendev.org/openstack/ansible-collections-openstack
type: git
version: f0cb7f680231bf17fdf043de4e5e8117c1aef097 version: f0cb7f680231bf17fdf043de4e5e8117c1aef097
- name: openstack.config_template
source: https://opendev.org/openstack/ansible-config_template
type: git type: git
- name: https://opendev.org/openstack/ansible-config_template
version: 2.0.0 version: 2.0.0
- name: openstack.osa
source: https://opendev.org/openstack/openstack-ansible-plugins
type: git type: git
- name: https://opendev.org/openstack/openstack-ansible-plugins
version: 5c8de0eb2c8b907f24bf1251b83d55457f91ea36 version: 5c8de0eb2c8b907f24bf1251b83d55457f91ea36
- name: community.general
source: https://github.com/ansible-collections/community.general
type: git type: git
- name: https://github.com/ansible-collections/community.general
version: 5.6.0 version: 5.6.0
- name: community.rabbitmq
source: https://github.com/ansible-collections/community.rabbitmq
type: git type: git
- name: https://github.com/ansible-collections/community.rabbitmq
version: 1.2.2 version: 1.2.2
- name: community.mysql
source: https://github.com/ansible-collections/community.mysql
type: git type: git
- name: https://github.com/ansible-collections/community.mysql
version: 3.5.1 version: 3.5.1
- name: community.crypto
source: https://github.com/ansible-collections/community.crypto
type: git type: git
- name: https://github.com/ansible-collections/community.crypto
version: 2.7.0 version: 2.7.0
- name: ansible.posix
source: https://github.com/ansible-collections/ansible.posix
type: git type: git
- name: https://github.com/ansible-collections/ansible.posix
version: 1.4.0 version: 1.4.0
- name: gluster.gluster
source: https://github.com/gluster/gluster-ansible-collection
type: git type: git
- name: https://github.com/gluster/gluster-ansible-collection
version: 1.0.2 version: 1.0.2
type: git
# NOTE(noonedeadpunk): needs version in galaxy.yml to pull from git # NOTE(noonedeadpunk): needs version in galaxy.yml to pull from git
- name: ansible.netcommon - name: ansible.netcommon
source: https://galaxy.ansible.com
type: galaxy
version: 3.1.1 version: 3.1.1
source: https://galaxy.ansible.com
- name: ansible.utils - name: ansible.utils
source: https://galaxy.ansible.com
type: galaxy
version: 2.6.1 version: 2.6.1
source: https://galaxy.ansible.com
- name: openvswitch.openvswitch - name: openvswitch.openvswitch
version: 2.1.0
source: https://galaxy.ansible.com source: https://galaxy.ansible.com
type: galaxy
version: 2.1.0

View File

@@ -49,7 +49,7 @@
- name: Check the Zuul src dir for cloned collections - name: Check the Zuul src dir for cloned collections
stat: stat:
path: "{{ zuul_src_path }}/{{ item.name.split('/')[-3:] | join('/') }}" path: "{{ zuul_src_path }}/{{ item.source.split('/')[-3:] | join('/') }}"
get_attributes: no get_attributes: no
get_checksum: no get_checksum: no
get_mime: no get_mime: no
@@ -59,7 +59,8 @@
- name: Override paths for zuul hosted collections in CI - name: Override paths for zuul hosted collections in CI
vars: vars:
zuul_item: zuul_item:
name: "git+file://{{ zuul_src_path }}/{{ item.item.name.split('/')[-3:] | join('/') }}" name: "{{ item.item.name }}"
source: "git+file://{{ zuul_src_path }}/{{ item.item.source.split('/')[-3:] | join('/') }}"
version: "{{ item.item.version }}" version: "{{ item.item.version }}"
type: "{{ item.item.type | default('') }}" type: "{{ item.item.type | default('') }}"
set_fact: set_fact: