46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: pipx
|
|
## Description: a runnable venv for simpler python packaging
|
|
## Version: system
|
|
## Methods: system
|
|
## Helpers: -
|
|
---
|
|
- name: Set pipx default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
pipx:
|
|
methods:
|
|
default:
|
|
- system
|
|
pkgname:
|
|
Archlinux: python-pipx
|
|
default: pipx
|
|
- name: Finalise pipx default facts
|
|
ansible.builtin.set_fact:
|
|
pipx:
|
|
methods: "{{ pipx.methods[os_family] | default(pipx.methods.default) }}"
|
|
pkgname: "{{ pipx.pkgname[os_family] | default(pipx.pkgname.default) }}"
|
|
# }}}
|
|
- name: Configure pipx
|
|
when:
|
|
- "'pipx' not in __configured"
|
|
block:
|
|
- name: Set pipx install method
|
|
when:
|
|
- pipx_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
pipx_imethod: "{{ imethod if imethod in pipx.methods else pipx.methods[0] }}"
|
|
|
|
- name: Configure pipx system install
|
|
when:
|
|
- pipx_imethod == 'system'
|
|
block:
|
|
- name: Queue pipx for system install
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + [pipx.pkgname] }}"
|
|
pipx_install: "{{ pipx_imethod }}={{ pipx.pkgname }}"
|
|
|
|
- name: Finalise pipx configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'pipx': pipx_install } ) }}"
|