start developing module for go_install
not going to be used for a long time Making pkg tasks truly single file
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
# Package: air
|
||||
# Description: application auto reload for go
|
||||
# Version: latest
|
||||
# Methods:
|
||||
# - source (go install)
|
||||
# Helpers: go_install
|
||||
#
|
||||
## Package: air
|
||||
## Description: application auto reload for go
|
||||
## Version: latest
|
||||
## Methods:
|
||||
## - source (go install)
|
||||
## Helpers: go_install
|
||||
---
|
||||
# {{{ Configure air
|
||||
- name: Set air default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
air:
|
||||
install_methods:
|
||||
- source
|
||||
install_files:
|
||||
- to: bin/air
|
||||
install_url: github.com/air-verse/air
|
||||
pkg_deps:
|
||||
- go
|
||||
air_version: "{{ air_version | default('latest')}}"
|
||||
# }}}
|
||||
- name: Start air configuration
|
||||
when:
|
||||
- "'air' not in __configured"
|
||||
@@ -24,14 +36,9 @@
|
||||
- name: Set air install package
|
||||
ansible.builtin.set_fact:
|
||||
air_go_pkg:
|
||||
url: "{{ air_install_url }}@{{ air_version }}"
|
||||
url: "{{ air.install_url }}@{{ air_version }}"
|
||||
bin: "{{ path_bin }}/air"
|
||||
# }}}
|
||||
# {{{ air build and install steps
|
||||
- name: Append air to pkg_go
|
||||
when:
|
||||
- air_install_method == 'source'
|
||||
block:
|
||||
|
||||
- name: Clean existing air install
|
||||
when:
|
||||
- clean_install
|
||||
@@ -47,7 +54,7 @@
|
||||
- name: Add air to install list
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [air_go_pkg] }}"
|
||||
# }}}
|
||||
|
||||
- name: Finalize air configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'air': air_install_method } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user