From d0fb142fdeaec9c23bec5a62262497c937d62cc7 Mon Sep 17 00:00:00 2001 From: "Chandan Kumar (raukadah)" Date: Wed, 12 May 2021 13:57:23 +0530 Subject: [PATCH] Use native pip for container-check installation We already install python2-pip on undercloud host and we donot need extra task to again install pip for the same. And easy_install module is not longer available with python2 leading to failure of tasks unnecessary. Removing it fixes the issues. Tested here: https://review.rdoproject.org/r/c/testproject/+/33649 Closes-Bug: #1927736 Signed-off-by: Chandan Kumar (raukadah) Change-Id: Iee8f19ed9cc7a2e0fbf9f82b4c32fc4f8bd4c525 --- .../tasks/overcloud-prep-containers.yml | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/roles/overcloud-prep-containers/tasks/overcloud-prep-containers.yml b/roles/overcloud-prep-containers/tasks/overcloud-prep-containers.yml index db72e1d5a..a8c24645f 100644 --- a/roles/overcloud-prep-containers/tasks/overcloud-prep-containers.yml +++ b/roles/overcloud-prep-containers/tasks/overcloud-prep-containers.yml @@ -2,41 +2,6 @@ - when: update_containers|bool block: - - name: ensure_pip on py2 systems - when: ansible_python.version.major == 2 - block: - - - command: "{{ python_cmd }} -m pip --version" - register: have_pip - changed_when: false - failed_when: false - - - when: have_pip.rc != 0 - become: true - block: - - - name: check if python setup tool is installed - shell: "{{ python_cmd }} -m easy_install --version" - register: easy_install_exists - changed_when: false - failed_when: false - - - name: Install python setuptools (easy_install) - when: easy_install_exists.rc != 0 - # noqa 403 - package: - state: latest - name: - - python2-setuptools - # python2-setuptools deprecates python-setuptools the former - # one being too old to be usable. included in openstack distro. - - - name: easy-install pip - shell: |- - "{{ python_cmd }} -m easy_install pip" - "{{ python_cmd }} -m pip install pip==20.3.4" - changed_when: true - - name: Update pip # noqa 403 pip: