Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,11 +1,51 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: zoxide
|
||||
## Description: cli path bookmark manager
|
||||
## Version: latest
|
||||
## Methods: [source, system]
|
||||
## Helpers: cargo
|
||||
---
|
||||
- name: Add zoxide
|
||||
- name: Set zoxide default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
zoxide:
|
||||
methods:
|
||||
- source
|
||||
- system
|
||||
pkgname: zoxide
|
||||
cargo:
|
||||
name: zoxide
|
||||
pkg_deps:
|
||||
- cargo
|
||||
# }}}
|
||||
- name: Configure zoxide
|
||||
when:
|
||||
- "'zoxide' not in __configured"
|
||||
block:
|
||||
- name: Append zoxide to pkg_sys
|
||||
- name: Set zoxide install method
|
||||
when:
|
||||
- zoxide_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['zoxide'] }}"
|
||||
zoxide_imethod: "{{ imethod if imethod in zoxide.methods else zoxide.methods[0] }}"
|
||||
|
||||
- name: Configure zoxide system install
|
||||
when:
|
||||
- zoxide_imethod == 'system'
|
||||
block:
|
||||
- name: Append zoxide to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [zoxide.pkgname] }}"
|
||||
zoxide_install: "{{ zoxide_imethod }}={{ zoxide.pkgname }}"
|
||||
|
||||
- name: Configure zoxide cargo install
|
||||
when:
|
||||
- zoxide_imethod == 'source'
|
||||
block:
|
||||
- name: Set zoxide cargo facts
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cargo: "{{ pkg_cargo + [zoxide.cargo] }}"
|
||||
zoxide_install: "{{ zoxide.imethod }}={{ zoxide.cargo }}"
|
||||
|
||||
- name: Set zoxide_configured
|
||||
ansible.builtin.set_fact:
|
||||
zoxide_configured: true
|
||||
__configured: "{{ __configured | combine( { 'zoxide': zoxide_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user