Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,19 +1,55 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: gping
|
||||
## Description: TUI ping tools with style
|
||||
## Version: latest
|
||||
## Methods: [system, source]
|
||||
## Helpers: cargo
|
||||
---
|
||||
- name: Add gping
|
||||
- name: Set gping default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
gping:
|
||||
methods:
|
||||
- system
|
||||
- source
|
||||
version: "{{ gping_version | default('latest') }}"
|
||||
pkgname: gping
|
||||
# }}}
|
||||
- name: Configure gping
|
||||
when:
|
||||
- "'gping' not in __configured"
|
||||
block:
|
||||
- name: Append gping to pkg_sys
|
||||
- name: Set gping install method
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
- gping_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + ['gping'] }}"
|
||||
gping_imethod: "{{ imethod if imethod in gping.methods else gping.methods[0] }}"
|
||||
|
||||
- name: Append gping to pkg_cargo
|
||||
- name: Configure gping system install
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cargo: "{{ pkg_cargo + ['gping'] }}"
|
||||
- gping_imethod == 'system'
|
||||
block:
|
||||
- name: Append gping to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [gping.pkgname] }}"
|
||||
gping_install: "{{ gping_imethod }}={{ gping.pkgname }}"
|
||||
|
||||
- name: Set gping_configured
|
||||
- name: Configure gping source install
|
||||
when:
|
||||
- gping_imethod == 'source'
|
||||
block:
|
||||
- name: Set gping cargo install
|
||||
ansible.builtin.set_fact:
|
||||
gping_cargo_install:
|
||||
name: "{{ gping.pkgname }}"
|
||||
version: "{{ gping.version }}"
|
||||
locked: true
|
||||
|
||||
- name: Queue gping cargo install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cargo: "{{ pkg_carg + [gping_cargo_install] }}"
|
||||
gping_install: "{{ gping_imethod }}={{ gping_cargo_install }}"
|
||||
|
||||
- name: Finalise gping configuration
|
||||
ansible.builtin.set_fact:
|
||||
gping_configured: true
|
||||
__configured: "{{ __configured | combine( { 'gping': gping_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user