- the make helper now has distinct build stages - configure: is now defined in pkg.targets.configure - build: is now defined in pkg.targets.build - install: is now defined in pkg.targets.install - added pre-install: which is a list of targets that are looped over before install - added post-instal: which is a list of targets that are looped over after install - removed major package level variables from vars/main.yml - moving those variables into actual package level variables as defaults - if the values are defined they will be used instead of defaults
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: bat
|
|
## Description: cat replacement with wings
|
|
## Version: latest
|
|
## Methods: source
|
|
## Helpers: cargo
|
|
---
|
|
- name: Set bat default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
bat:
|
|
install_methods:
|
|
- source
|
|
- system
|
|
pkgname:
|
|
RedHat: bat
|
|
Debian: bat
|
|
Archlinux: bat
|
|
Alpine: bat
|
|
Darwin: bat
|
|
FreeBSD: bat
|
|
# }}}
|
|
- 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 } ) }}"
|