Files
ansible_role_package/tasks/pkgs/bat.yml
Matthew Stobbs 692e9dd99a start developing module for go_install
not going to be used for a long time
Making pkg tasks truly single file
2026-03-03 21:35:46 -07:00

44 lines
1.3 KiB
YAML

# vim: set filetype=yaml.ansible :
#
## Package: bat
## Description: cat replacement with style
## Version: latest
## Methods:
## - system
---
- name: Start bat configuration
when:
- "'bat' not in __configured"
block:
- name: Set bat install method
when:
- bat_install_method is undefined
ansible.builtin.set_fact:
bat_install_method: "{{ install_method if install_method in bat.install_methods else bat.install_methods[0] }}"
- name: Configure bat source install
when:
- bat_install_method == "source"
block:
- name: Set bat cargo configuration
ansible.builtin.set_fact:
bat_cargo_install:
name: bat
locked: true
- name: Queue bat for cargo install
ansible.builtin.set_fact:
pkg_carg: "{{ pkg_cargo + [bat_cargo_install] }}"
- name: Configure bat system install
when:
- bat_install_method == "system"
block:
- name: Append bat to pkg_sys
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + [ bat.pkgname[os_family] ] }}"
- name: Finalize bat configuration
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'bat': bat_install_method } ) }}"