Try to fix the path of the pip executable.
This commit is contained in:
parent
bd17756795
commit
1cf0c29d49
|
@ -6,21 +6,50 @@
|
||||||
- name: Install the python3 EL additional packages
|
- name: Install the python3 EL additional packages
|
||||||
yum: name={{ py3_el_env_pkg }} state={{ py3_env_pkgs_state }}
|
yum: name={{ py3_el_env_pkg }} state={{ py3_env_pkgs_state }}
|
||||||
|
|
||||||
|
- name: Find the pip3 executable
|
||||||
|
stat:
|
||||||
|
path: '/usr/local/bin/pip{{ py3_env_major_version }}'
|
||||||
|
register: pip3_path_executable
|
||||||
|
|
||||||
- name: Ensure that we have the latest pip, setuptools and wheel versions
|
- name: Ensure that we have the latest pip, setuptools and wheel versions
|
||||||
pip:
|
pip:
|
||||||
executable: 'pip{{ py3_env_major_version }}'
|
executable: '/usr/local/bin/pip{{ py3_env_major_version }}'
|
||||||
name: '{{ py3_env_pip_default_pkgs }}'
|
name: '{{ py3_env_pip_default_pkgs }}'
|
||||||
state: latest
|
state: latest
|
||||||
|
when: pip3_path_executable.stat.exists
|
||||||
|
|
||||||
|
- name: Ensure that we have the latest pip, setuptools and wheel versions
|
||||||
|
pip:
|
||||||
|
executable: '/usr/bin/pip{{ py3_env_major_version }}'
|
||||||
|
name: '{{ py3_env_pip_default_pkgs }}'
|
||||||
|
state: latest
|
||||||
|
when: not pip3_path_executable.stat.exists
|
||||||
|
|
||||||
- name: Install a list of binary pip3 packages in wheels format
|
- name: Install a list of binary pip3 packages in wheels format
|
||||||
pip: executable=pip{{ py3_env_major_version }} name={{ py3_env_wheel_pip_pkgs }} state={{ py3_pip_pkgs_state }}
|
pip: executable=/usr/local/bin/pip{{ py3_env_major_version }} name={{ py3_env_wheel_pip_pkgs }} state={{ py3_pip_pkgs_state }}
|
||||||
|
when: pip3_path_executable.stat.exists
|
||||||
|
|
||||||
|
- name: Install a list of binary pip3 packages in wheels format
|
||||||
|
pip: executable=/usr/bin/pip{{ py3_env_major_version }} name={{ py3_env_wheel_pip_pkgs }} state={{ py3_pip_pkgs_state }}
|
||||||
|
when: not pip3_path_executable.stat.exists
|
||||||
|
|
||||||
- name: Install a list of versioned pip3 packages on EL
|
- name: Install a list of versioned pip3 packages on EL
|
||||||
pip: executable=pip{{ py3_env_major_version }} name={{ item.pkg }} version={{ item.version }} extra_args={{ item.extra_args | default('') }}
|
pip: executable=/usr/local/bin/pip{{ py3_env_major_version }} name={{ item.pkg }} version={{ item.version }} extra_args={{ item.extra_args | default('') }}
|
||||||
with_items: '{{ py3_env_versioned_pip_pkgs | default ([]) }}'
|
with_items: '{{ py3_env_versioned_pip_pkgs | default ([]) }}'
|
||||||
|
when: pip3_path_executable.stat.exists
|
||||||
|
|
||||||
|
- name: Install a list of versioned pip3 packages on EL
|
||||||
|
pip: executable=/usr/bin/pip{{ py3_env_major_version }} name={{ item.pkg }} version={{ item.version }} extra_args={{ item.extra_args | default('') }}
|
||||||
|
with_items: '{{ py3_env_versioned_pip_pkgs | default ([]) }}'
|
||||||
|
when: not pip3_path_executable.stat.exists
|
||||||
|
|
||||||
- name: Install a list of pip3 packages on EL
|
- name: Install a list of pip3 packages on EL
|
||||||
pip: executable=pip{{ py3_env_major_version }} name={{ py3_env_pip_pkgs }} state={{ py3_pip_pkgs_state }}
|
pip: executable=/usr/local/bin/pip{{ py3_env_major_version }} name={{ py3_env_pip_pkgs }} state={{ py3_pip_pkgs_state }}
|
||||||
|
when: pip3_path_executable.stat.exists
|
||||||
|
|
||||||
|
- name: Install a list of pip3 packages on EL
|
||||||
|
pip: executable=/usr/bin/pip{{ py3_env_major_version }} name={{ py3_env_pip_pkgs }} state={{ py3_pip_pkgs_state }}
|
||||||
|
when: not pip3_path_executable.stat.exists
|
||||||
|
|
||||||
when: py3_env_install
|
when: py3_env_install
|
||||||
tags: [ "python", "py3_env", "py3_env_pkgs", 'python3' ]
|
tags: [ "python", "py3_env", "py3_env_pkgs", 'python3' ]
|
||||||
|
|
Loading…
Reference in New Issue