Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,5 +1,63 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: air
|
||||
## Description: application auto reload for go
|
||||
## Version: latest
|
||||
## Methods: source
|
||||
## Helpers: go_install
|
||||
---
|
||||
- name: Append air to pkg_go
|
||||
- name: Set air default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + ['github.com/air-verse/air@latest'] }}"
|
||||
air:
|
||||
methods:
|
||||
- source
|
||||
install_files:
|
||||
- to: bin/air
|
||||
install_url: github.com/air-verse/air
|
||||
pkg_deps:
|
||||
- go
|
||||
version: "{{ air_version | default('latest')}}"
|
||||
# }}}
|
||||
- name: Start air configuration
|
||||
when:
|
||||
- "'air' not in __configured"
|
||||
block:
|
||||
- name: Set air install method
|
||||
when:
|
||||
- air_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
air_imethod: "{{ imethod if imethod in air.methods else air.methods[0] }}"
|
||||
|
||||
- name: Set air build facts
|
||||
when:
|
||||
- air_imethod == 'source'
|
||||
block:
|
||||
- name: Set air install package
|
||||
ansible.builtin.set_fact:
|
||||
air_go_pkg:
|
||||
url: "{{ air.install_url }}@{{ air.version }}"
|
||||
bin: "{{ path_bin }}/air"
|
||||
|
||||
- name: Clean existing air install
|
||||
when:
|
||||
- clean_install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_clean: "{{ pkg_clean + air.install_files }}"
|
||||
|
||||
- name: Configure pkg dependencies
|
||||
loop: "{{ air.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
||||
|
||||
- name: Add air to install list
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [air_go_pkg] }}"
|
||||
|
||||
- name: Finalise air source install
|
||||
ansible.builtin.set_fact:
|
||||
air_install: "{{ air_imethod }}={{ air_go_pkg }}"
|
||||
|
||||
- name: Finalize air configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'air': air_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user