2023-03-14 22:23:33 +00:00
|
|
|
---
|
|
|
|
# task/main file for manage_pip_packages
|
2023-03-15 21:32:18 +00:00
|
|
|
- name: "Import prerequisites.yml"
|
|
|
|
ansible.builtin.include_tasks: prerequisites.yml
|
2023-03-15 22:12:05 +00:00
|
|
|
when: manage_pip_packages_install_prereqs
|
2023-03-15 21:32:18 +00:00
|
|
|
|
|
|
|
- name: "Install/remove required packages"
|
|
|
|
ansible.builtin.pip:
|
|
|
|
name: "{{ item.name }}{% if item.version_constraint not in [None, '', 'latest'] %}{{ item.version_constraint }}{% endif %}"
|
|
|
|
state: "{{ item.state }}"
|
|
|
|
loop: "{{ manage_pip_packages_list }}"
|
|
|
|
when: manage_pip_packages_list is defined
|
|
|
|
and manage_pip_packages_list not in [None, '']
|