mirror of
https://github.com/geerlingguy/ansible-role-pip.git
synced 2024-11-15 10:35:10 +01:00
Use pip3 for python3
This commit is contained in:
parent
69add2c5f0
commit
4dcb2b5ecf
@ -4,13 +4,6 @@
|
||||
name: "{{ pip_package }}"
|
||||
state: present
|
||||
|
||||
- name: Link Pip3 to pip
|
||||
file:
|
||||
src: "/usr/bin/pip3"
|
||||
dest: "/usr/bin/pip"
|
||||
state: link
|
||||
when: pip_package == "python3-pip"
|
||||
|
||||
- name: Ensure pip_install_packages are installed.
|
||||
pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
@ -18,3 +11,19 @@
|
||||
virtualenv: "{{ item.virtualenv | default(omit) }}"
|
||||
state: "{{ item.state | default(omit) }}"
|
||||
with_items: "{{ pip_install_packages }}"
|
||||
when: pip_package != "python3-pip"
|
||||
|
||||
|
||||
- name: Ensure pip_install_packages are installed.
|
||||
pip:
|
||||
name: "{{ item.name | default(item) }}"
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
virtualenv: "{{ item.virtualenv | default(omit) }}"
|
||||
state: "{{ item.state | default(omit) }}"
|
||||
executable: pip3
|
||||
with_items: "{{ pip_install_packages }}"
|
||||
when: pip_package == "python3-pip"
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user