manage_pipx_packages/tasks/main.yml
Bertrand Lanson 01a8315828
All checks were successful
test / Linting (push) Successful in 9s
test / Molecule tests (default, debian12) (push) Successful in 1m13s
test / Molecule tests (default, ubuntu2204) (push) Successful in 1m15s
test / Molecule tests (with_custom_packages, debian12) (push) Successful in 1m19s
test / Molecule tests (with_custom_packages, ubuntu2204) (push) Successful in 1m16s
feat: add vagrant tests for later
2023-11-29 22:22:59 +01:00

18 lines
679 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, '']
become: true