From e4b595d910d0fafbd5e9b99daa65b896c1a01829 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 20 Dec 2022 13:37:32 +0100 Subject: [PATCH] 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 --- ansible-collection-requirements.yml | 38 ++++++++++++------- .../get-ansible-collection-requirements.yml | 5 ++- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/ansible-collection-requirements.yml b/ansible-collection-requirements.yml index 66c4b2ea3f..9549940c54 100644 --- a/ansible-collection-requirements.yml +++ b/ansible-collection-requirements.yml @@ -1,40 +1,52 @@ --- collections: -- name: https://opendev.org/openstack/ansible-collections-openstack +- name: openstack.cloud + source: https://opendev.org/openstack/ansible-collections-openstack + type: git version: f0cb7f680231bf17fdf043de4e5e8117c1aef097 +- name: openstack.config_template + source: https://opendev.org/openstack/ansible-config_template type: git -- name: https://opendev.org/openstack/ansible-config_template version: 2.0.0 +- name: openstack.osa + source: https://opendev.org/openstack/openstack-ansible-plugins type: git -- name: https://opendev.org/openstack/openstack-ansible-plugins version: 5c8de0eb2c8b907f24bf1251b83d55457f91ea36 +- name: community.general + source: https://github.com/ansible-collections/community.general type: git -- name: https://github.com/ansible-collections/community.general version: 5.6.0 +- name: community.rabbitmq + source: https://github.com/ansible-collections/community.rabbitmq type: git -- name: https://github.com/ansible-collections/community.rabbitmq version: 1.2.2 +- name: community.mysql + source: https://github.com/ansible-collections/community.mysql type: git -- name: https://github.com/ansible-collections/community.mysql version: 3.5.1 +- name: community.crypto + source: https://github.com/ansible-collections/community.crypto type: git -- name: https://github.com/ansible-collections/community.crypto version: 2.7.0 +- name: ansible.posix + source: https://github.com/ansible-collections/ansible.posix type: git -- name: https://github.com/ansible-collections/ansible.posix version: 1.4.0 +- name: gluster.gluster + source: https://github.com/gluster/gluster-ansible-collection type: git -- name: https://github.com/gluster/gluster-ansible-collection version: 1.0.2 - type: git # NOTE(noonedeadpunk): needs version in galaxy.yml to pull from git - name: ansible.netcommon + source: https://galaxy.ansible.com + type: galaxy version: 3.1.1 - source: https://galaxy.ansible.com - name: ansible.utils + source: https://galaxy.ansible.com + type: galaxy version: 2.6.1 - source: https://galaxy.ansible.com - name: openvswitch.openvswitch - version: 2.1.0 source: https://galaxy.ansible.com + type: galaxy + version: 2.1.0 diff --git a/scripts/get-ansible-collection-requirements.yml b/scripts/get-ansible-collection-requirements.yml index e71108fa73..02c9f8e35c 100644 --- a/scripts/get-ansible-collection-requirements.yml +++ b/scripts/get-ansible-collection-requirements.yml @@ -49,7 +49,7 @@ - name: Check the Zuul src dir for cloned collections stat: - path: "{{ zuul_src_path }}/{{ item.name.split('/')[-3:] | join('/') }}" + path: "{{ zuul_src_path }}/{{ item.source.split('/')[-3:] | join('/') }}" get_attributes: no get_checksum: no get_mime: no @@ -59,7 +59,8 @@ - name: Override paths for zuul hosted collections in CI vars: 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 }}" type: "{{ item.item.type | default('') }}" set_fact: