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
|
2023-08-23 21:27:16 +00:00
|
|
|
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 }}"
|
2023-08-24 19:55:43 +00:00
|
|
|
environment:
|
2023-08-24 21:23:51 +00:00
|
|
|
PIPX_HOME: "{{ manage_pipx_packages_home }}"
|
2023-08-24 19:55:43 +00:00
|
|
|
PIPX_BIN_DIR: "{{ manage_pipx_packages_path }}"
|
2023-08-23 21:27:16 +00:00
|
|
|
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
|