From 6f304c81e2c5fbc2785424e377ff231a1a061885 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 17 May 2021 18:13:20 +0200 Subject: [PATCH] Update pip and setuptools before installing requirements We are seeing the kayobe-overcloud-ubuntu-focal CI job fail while deploying Tenks with: ModuleNotFoundError: No module named 'pkg_resources.extern.six' Updating pip and setuptools to the latest allowed in upper constraints appears to fix it. Change-Id: Ida85adca948664d7d4427edd6c3ab15fd75fb3fe --- ansible/roles/ironic-enrolment/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ansible/roles/ironic-enrolment/tasks/main.yml b/ansible/roles/ironic-enrolment/tasks/main.yml index cd72c95..f46f2e0 100644 --- a/ansible/roles/ironic-enrolment/tasks/main.yml +++ b/ansible/roles/ironic-enrolment/tasks/main.yml @@ -9,6 +9,17 @@ - not lookup('env', 'OS_USERNAME') - not lookup('env', 'OS_CLOUD') +- name: Ensure the latest versions of pip and setuptools are installed + pip: + name: "{{ item.name }}" + state: latest # noqa package-latest + virtualenv: "{{ ironic_virtualenv_path }}" + extra_args: >- + -c {{ ironic_python_upper_constraints_url }} + with_items: + - { name: pip } + - { name: setuptools } + # This is useful to get a uniquely generated temporary path. - name: Create temporary file for pip requirements tempfile: