manage_pip_packages/tasks/main.yml

14 lines
540 B
YAML

---
# task/main file for manage_pip_packages
- name: "Import prerequisites.yml"
ansible.builtin.include_tasks: prerequisites.yml
when: manage_pip_packages_install_prereqs
- name: "Install/remove required pip 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, '']