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

@@ -9,7 +9,7 @@
- name: Set bat default facts # {{{
ansible.builtin.set_fact:
bat:
install_methods:
methods:
- source
- system
pkgname:
@@ -26,13 +26,13 @@
block:
- name: Set bat install method
when:
- bat_install_method is undefined
- bat_imethod is undefined
ansible.builtin.set_fact:
bat_install_method: "{{ install_method if install_method in bat.install_methods else bat.install_methods[0] }}"
bat_imethod: "{{ imethod if imethod in bat.methods else bat.methods[0] }}"
- name: Configure bat source install
when:
- bat_install_method == "source"
- bat_imethod == "source"
block:
- name: Set bat cargo configuration
ansible.builtin.set_fact:
@@ -42,16 +42,24 @@
- name: Queue bat for cargo install
ansible.builtin.set_fact:
pkg_carg: "{{ pkg_cargo + [bat_cargo_install] }}"
pkg_cargo: "{{ pkg_cargo + [bat_cargo_install] }}"
- name: Finalise bat source install
ansible.builtin.set_fact:
bat_install: "{{ bat_imethod }}={{ bat_cargo_install }}"
- name: Configure bat system install
when:
- bat_install_method == "system"
- bat_imethod == "system"
block:
- name: Append bat to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + [ bat.pkgname[os_family] ] }}"
- name: Finalise bat system install
ansible.builtin.set_fact:
bat_install: "{{ bat_imethod }}={{ bat.pkgname[os_family] }}"
- name: Finalize bat configuration
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'bat': bat_install_method } ) }}"
__configured: "{{ __configured | combine( { 'bat': bat_install } ) }}"