diff --git a/ansible/roles/baremetal/defaults/main.yml b/ansible/roles/baremetal/defaults/main.yml index c5e4d5ef23..2fea74a453 100644 --- a/ansible/roles/baremetal/defaults/main.yml +++ b/ansible/roles/baremetal/defaults/main.yml @@ -35,18 +35,6 @@ docker_storage_driver: "" docker_custom_option: "" docker_custom_config: {} -# Ubuntu 18+ does not have easy_install available due to -# https://bugs.launchpad.net/ubuntu/+source/python-setuptools/+bug/1774419. -# CentOS/RHEL 8 does not have easy_install. -easy_install_available: >- - {{ not (ansible_distribution == 'Ubuntu' and - ansible_distribution_major_version is version(18, 'ge')) - and - not (ansible_distribution == 'Debian' and - ansible_distribution_major_version is version(10, 'ge')) - and - not ansible_os_family == 'RedHat' }} - # Version of python used to execute Ansible modules. host_python_version: "{{ ansible_python.version.major }}.{{ ansible_python.version.minor }}" @@ -54,14 +42,14 @@ debian_pkg_install: - "{{ docker_apt_package }}" - git - "python3-setuptools" - - "{% if not easy_install_available %}python3-pip{% endif %}" + - "python3-pip" - "{% if virtualenv is not none %}python3-virtualenv{% endif %}" - "{% if enable_host_ntp | bool %}ntp{% endif %}" redhat_pkg_install: - "{{ docker_yum_package }}" - git - - "{% if not easy_install_available %}python3-pip{% endif %}" + - "python3-pip" - "{% if virtualenv is not none %}python3-virtualenv{% endif %}" - "{% if enable_host_ntp | bool %}ntp{% endif %}" - sudo diff --git a/ansible/roles/baremetal/tasks/install.yml b/ansible/roles/baremetal/tasks/install.yml index 0d1216215d..e2fbf91618 100644 --- a/ansible/roles/baremetal/tasks/install.yml +++ b/ansible/roles/baremetal/tasks/install.yml @@ -103,14 +103,6 @@ vars: install_result: "{{ rpm_install_result if ansible_os_family == 'RedHat' else apt_install_result }}" -- name: Install pip - easy_install: - name: pip - virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}" - virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}" - become: True - when: easy_install_available - - name: Install latest pip in the virtualenv pip: # NOTE(hrw) pip 19.3 is first version complaining about being run with Python 2