adjusting variable names, fixing errors
This commit is contained in:
@@ -1,9 +1,45 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: fd
|
||||
## Description: a modern find replacement
|
||||
## Version: latest
|
||||
## Methods: system
|
||||
## Helpers: -
|
||||
---
|
||||
- name: Load fd config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/fd.yml
|
||||
|
||||
- name: Append fd to pkg_sys
|
||||
- name: Set fd default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + fd.pkgs }}"
|
||||
fd:
|
||||
methods:
|
||||
- system
|
||||
pkgname:
|
||||
RedHat: fd-find
|
||||
Debian: fd
|
||||
Darwin: fd
|
||||
Alpine: fd
|
||||
FreeBSD: fd-find
|
||||
# }}}
|
||||
- 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 } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user