non functional for now

This commit is contained in:
Bertrand Lanson 2023-08-22 23:46:01 +02:00
parent 6ab6ef9f8f
commit 1dd86348a9
5 changed files with 32 additions and 1 deletions

View File

@ -1,2 +1,7 @@
---
# defaults file for manage_pipx_packages
manage_pipx_packages_install_prereqs: true
manage_pipx_packages_list:
- name: pip
version_constraint: latest
state: present

View File

@ -4,7 +4,7 @@ galaxy_info:
namespace: 'ednxzu'
role_name: 'manage_pipx_packages'
author: 'Bertrand Lanson'
description: ''
description: 'Package management for python using pipx on debian-based distros.'
license: 'license (BSD, MIT)'
min_ansible_version: '2.10'
platforms:
@ -15,6 +15,7 @@ galaxy_info:
- name: Debian
versions:
- bullseye
- bookworm
galaxy_tags:
- 'ubuntu'
- 'debian'

View File

@ -1,2 +1,13 @@
---
# task/main file for manage_pipx_packages
- name: "Import prerequisites.yml"
ansible.builtin.include_tasks: prerequisites.yml
when: manage_pip_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 }}"
loop: "{{ manage_pip_packages_list }}"
when: manage_pip_packages_list is defined
and manage_pip_packages_list not in [None, '']

7
tasks/prerequisites.yml Normal file
View File

@ -0,0 +1,7 @@
---
# task/prerequisites file for manage_pipx_packages
- name: "Install python3 and pipx"
ansible.builtin.include_role:
name: ednxzu.manage_apt_packages
vars:
manage_apt_packages_list: "{{ manage_pipx_packages_required_packages }}"

View File

@ -1,2 +1,9 @@
---
# vars file for manage_pipx_packages
manage_pipx_packages_required_packages:
- name: python3
version: latest
state: present
- name: pipx
version: latest
state: present