working on go

Signed-off-by: Matthew Stobbs <matthew@stobbs.ca>
This commit is contained in:
Matthew Stobbs
2026-02-02 17:06:31 -07:00
parent b9fdf03298
commit 81a1dd7469
9 changed files with 237 additions and 147 deletions

View File

@@ -1,9 +1,8 @@
# vim: set filetype=yaml.ansible :
---
- name: Set air configuration # {{{
- name: Configure air # {{{
when:
- __air_configured is undefined or
not __air_configured
- __air_configured is undefined
block:
- name: Set air install method
when:
@@ -11,21 +10,40 @@
ansible.builtin.set_fact:
air_install_method: "{% if install_method in air_install_methods %}{{ install_method }}{% else %}{{ air_install_method[0] }}{% endif %}"
- name: Set air version and url
ansible.builtin.set_fact:
air_version: "{{ air_version | default('latest') }}"
air_install_url: "{{ air_install_url | default('github.com/air-verse/air') }}"
- name: Configure air source install
when:
- air_install_method == '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: Append air to pkg_go
when:
- air_install_method == 'source'
block:
- name: Clean existing air install
when:
- clean_install
loop: air_build_files
loop_control:
lopo_var: air_file
ansible.builtin.file:
state: absent
path: "{{ install_prefix }}/{{ air_file }}"
- name: Set air install package
ansible.builtin.set_fact:
air_pkg: "{{ air_install_url }}@{{ air_version }}"
- name: Configure pkg dependencies
loop: "{{ air_pkg_deps }}"
loop_control:
loop_var: air_pkg_dep
ansible.builtin.include_tasks: "{{ air_pkg_dep }}"
- name: Add air to install list
ansible.builtin.set_fact:
pkg_go: "{{ pkg_go + [air_go_pkg] }}"
- name: Complete air configuration
ansible.builtin.set_fact:
__air_configured: true
# }}}
- name: Append air to pkg_go
when:
- air_install_method == 'source'
ansible.builtin.set_fact:
pkg_go: "{{ pkg_go + [air_pkg] }}"