From 86dc21a3fef67c68adc7c0b010e3965be4b27835 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Tue, 28 Feb 2023 16:32:24 +0100 Subject: [PATCH] Support ansible-collections-openstack 2 and later Change-Id: Ibff355af7be0735741a2fbb1a81c3c64e3f52a94 --- ansible-collections-requirements.yml | 2 +- .../roles/bifrost-create-vm-nodes/tasks/main.yml | 8 -------- .../roles/bifrost-keystone-install/tasks/install.yml | 8 +------- .../roles/bifrost-prep-for-install/tasks/main.yml | 8 -------- zuul.d/project.yaml | 11 +---------- 5 files changed, 3 insertions(+), 34 deletions(-) diff --git a/ansible-collections-requirements.yml b/ansible-collections-requirements.yml index 9cd55a61b..2cb9890a5 100644 --- a/ansible-collections-requirements.yml +++ b/ansible-collections-requirements.yml @@ -1,4 +1,4 @@ collections: - name: openstack.cloud - version: '>=1.3.0,<2.0.0' + version: '>=2.0.0' source: https://galaxy.ansible.com diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml index f4ea774a4..d1ef98e59 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml @@ -92,14 +92,6 @@ group: "{{ ansible_user_gid }}" when: copy_from_local_path | bool -# FIXME(dtantsur): downgrade openstacksdk since ansible-collections-openstack -# before 2.0.0 cannot work with 0.99.0. Remove when we use >=2.0.0. -- name: downgrade openstacksdk in upper constraints - lineinfile: - path: "{{ upper_constraints_file }}" - regexp: "^openstacksdk=" - line: "openstacksdk===0.61.0" - - import_tasks: prepare_libvirt.yml - name: truncate explicit list of vm names diff --git a/playbooks/roles/bifrost-keystone-install/tasks/install.yml b/playbooks/roles/bifrost-keystone-install/tasks/install.yml index e71a6ee8a..93c083468 100644 --- a/playbooks/roles/bifrost-keystone-install/tasks/install.yml +++ b/playbooks/roles/bifrost-keystone-install/tasks/install.yml @@ -39,17 +39,11 @@ vars: package: pymysql -- name: "Remove python-openstackclient from upper constraints" - lineinfile: - path: "{{ upper_constraints_file }}" - regexp: "^python\\-openstackclient" - state: absent - - name: "Install python-openstackclient" include_role: name: bifrost-pip-install vars: - package: "python-openstackclient<6.1.0" + package: python-openstackclient - name: "Install keystone" include_role: diff --git a/playbooks/roles/bifrost-prep-for-install/tasks/main.yml b/playbooks/roles/bifrost-prep-for-install/tasks/main.yml index 5ee6faf10..6d0990cf1 100644 --- a/playbooks/roles/bifrost-prep-for-install/tasks/main.yml +++ b/playbooks/roles/bifrost-prep-for-install/tasks/main.yml @@ -75,11 +75,3 @@ - copy_from_local_path | bool - item.source_install | default(true) | bool - item.enabled | default(true) | bool - -# FIXME(dtantsur): downgrade openstacksdk since ansible-collections-openstack -# before 2.0.0 cannot work with 0.99.0. Remove when we use >=2.0.0. -- name: downgrade openstacksdk in upper constraints - lineinfile: - path: "{{ upper_constraints_file }}" - regexp: "^openstacksdk=" - line: "openstacksdk===0.61.0" diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 502f69af3..8981708d2 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -35,19 +35,10 @@ voting: false - bifrost-collections-src: voting: false - # FIXME(dtantsur): downgrade ansible-collections-openstack - # and openstacksdk because the former has not been ported - # yet to openstacksdk >=0.99.0 required-projects: &bifrost_collections_required_projects - - name: openstack/ansible-collections-openstack - override-checkout: stable/1.0.0 - - name: openstack/openstacksdk - override-checkout: stable/yoga + - openstack/ansible-collections-openstack - bifrost-keystone-collections-src: voting: false - # FIXME(dtantsur): downgrade ansible-collections-openstack - # and openstacksdk because the former has not been ported - # yet to openstacksdk >=0.99.0 required-projects: *bifrost_collections_required_projects - kolla-ansible-ubuntu-bifrost: voting: false