mirror of
https://github.com/geerlingguy/ansible-role-pip.git
synced 2024-11-16 10:45:11 +01:00
update to a single task
This commit is contained in:
parent
4dcb2b5ecf
commit
cffcf33bd2
@ -10,19 +10,8 @@
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
virtualenv: "{{ item.virtualenv | default(omit) }}"
|
||||
state: "{{ item.state | default(omit) }}"
|
||||
executable: {{ 'pip3' if pip_package == "python3-pip" else 'pip' }}
|
||||
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