adjusting variable names, fixing errors

This commit is contained in:
2026-03-19 21:46:04 -06:00
parent d1d556d425
commit 2d65e01f7b
38 changed files with 697 additions and 298 deletions

View File

@@ -6,10 +6,10 @@
## Methods: [source, system]
## Helpers: cargo
---
- name: Set default broot values
- name: Set default broot values # {{{
ansible.builtin.set_fact:
broot:
install_methods:
methods:
- source
- system
version: 1.55.0
@@ -25,30 +25,31 @@
Alpine:
- libxcb-dev
Darwin: []
- name: Add broot
# }}}
- name: Configure broot
when:
- "'broot' not in __configured"
block:
- name: Set broot install method
when:
- broot_install_method is undefined
- broot_imethod is undefined
block:
- name: Configure for RedHat <= 10
when:
- os_family == 'RedHat'
- ansible_distribution_major_version|int <= 10
- os_version.major | int <= 10
ansible.builtin.set_fact:
broot_install_method: source
broot_imethod: source
- name: Fallback set ansible_lint install method
when:
- broot_install_method is undefined
- broot_imethod is undefined
ansible.builtin.set_fact:
broot_install_method: "{{ install_method if install_method in broot.install_methods else broot.install_methods[0] }}"
broot_imethod: "{{ imethod if imethod in broot.methods else broot.methods[0] }}"
- name: Configure broot source install
when:
- broot_install_method == 'source'
- broot_imethod == 'source'
block:
- name: Set cargo build options
ansible.builtin.set_fact:
@@ -61,9 +62,13 @@
pkg_sys: "{{ pkg_sys + broot.build_deps[os_family] }}"
pkg_cargo: "{{ pkg_cargo + [broot_cargo_install] }}"
- name: Finalise broot source install
ansible.builtin.set_fact:
broot_install: "{{ broot_imethod }}={{ broot_cago_install }}+{{ broot.build_deps[os_family] }}"
- name: Configure broot system install
when:
- broot_install_method == 'system'
- broot_imethod == 'system'
block:
- name: Append broot to pkg_sys
when:
@@ -71,6 +76,10 @@
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['broot'] }}"
- name: Finalise broot system install
ansible.builtin.set_fact:
broot_install: "{{ broot_imethod }}=broot"
- name: Set broot_configured
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'broot': broot_install_method } ) }}"
__configured: "{{ __configured | combine( { 'broot': broot_install } ) }}"