Use pip3 for python3

This commit is contained in:
Michael Porter 2018-09-09 19:01:25 -05:00
parent 69add2c5f0
commit 4dcb2b5ecf
No known key found for this signature in database
GPG Key ID: 5471D27291D993FA

View File

@ -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"