47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: fd
|
|
## Description: a modern find replacement
|
|
## Version: latest
|
|
## Methods: system
|
|
## Helpers: -
|
|
---
|
|
- name: Set fd default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
fd:
|
|
methods:
|
|
- system
|
|
pkgname:
|
|
RedHat: fd-find
|
|
Debian: fd
|
|
Darwin: fd
|
|
Alpine: fd
|
|
FreeBSD: fd-find
|
|
Archlinux: fd
|
|
# }}}
|
|
- name: Configure fd
|
|
when:
|
|
- "'fd' not in __configured"
|
|
block:
|
|
- name: Set fd install method
|
|
when:
|
|
- fd_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
fd_imethod: "{{ imethod if imethod in fd.methods else fd.methods[0] }}"
|
|
|
|
- name: Configur fd system install
|
|
when:
|
|
- fd_imethod == 'system'
|
|
block:
|
|
- name: Queue fd for system install
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + [ fd.pkgname[os_family] ] }}"
|
|
|
|
- name: Finalise fd system install
|
|
ansible.builtin.set_fact:
|
|
fd_install: "{{ fd_imethod }}={{ fd.pkgname[os_family] }}"
|
|
|
|
- name: Finalise fd configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'fd': fd_install } ) }}"
|