manage_pipx_packages/tasks/main.yml
Bertrand Lanson f189113ebf
All checks were successful
test / Linting (push) Successful in 23s
test / Molecule tests (default, debian12) (push) Successful in 2m4s
test / Molecule tests (default, ubuntu2204) (push) Successful in 2m33s
test / Molecule tests (with_custom_packages, ubuntu2204) (push) Successful in 1m54s
test / Molecule tests (with_custom_packages, debian12) (push) Successful in 4m59s
feat: remove become from role
2023-12-03 17:52:13 +01:00

17 lines
664 B
YAML

---
# task/main file for manage_pipx_packages
- name: "Import prerequisites.yml"
ansible.builtin.include_tasks: prerequisites.yml
when: manage_pipx_packages_install_prereqs
- 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:
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, '']