manage_pipx_packages/tasks/main.yml

18 lines
679 B
YAML
Raw Normal View History

2023-08-22 21:19:33 +00:00
---
# task/main file for manage_pipx_packages
2023-08-22 21:46:01 +00:00
- name: "Import prerequisites.yml"
ansible.builtin.include_tasks: prerequisites.yml
when: manage_pipx_packages_install_prereqs
2023-08-22 21:46:01 +00:00
- name: "Install/remove required pip packages"
community.general.pipx:
name: "{{ item.name }}{% if item.version_constraint not in [None, '', 'latest'] %}{{ item.version_constraint }}{% endif %}"
state: "{{ item.state }}"
environment:
2023-08-24 21:23:51 +00:00
PIPX_HOME: "{{ manage_pipx_packages_home }}"
PIPX_BIN_DIR: "{{ manage_pipx_packages_path }}"
loop: "{{ manage_pipx_packages_list }}"
when: manage_pipx_packages_list is defined
and manage_pipx_packages_list not in [None, '']
2023-11-29 21:22:59 +00:00
become: true