39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Set air configuration
|
|
when:
|
|
- __air_configured is undefined or
|
|
not __air_configured
|
|
block:
|
|
- name: Set air_install_method
|
|
when:
|
|
- air_install_method is undefined
|
|
ansible.builtin.set_fact:
|
|
air_install_method: source
|
|
|
|
- name: Set air version and url
|
|
ansible.builtin.set_fact:
|
|
air_version: "{{ air_version | default('latest') }}"
|
|
air_url: "{{ air_url | default('github.com/air-verse/air') }}"
|
|
|
|
- name: Set air install path
|
|
ansible.builtin.set_fact:
|
|
air_pkg: "{{ air_url }}@{{ air_version }}"
|
|
|
|
- name: Ensure air_install_method is valid
|
|
when:
|
|
- air_install_method is defined
|
|
- air_install_method not in air_install_methods
|
|
ansible.builtin.set_fact:
|
|
air_intall_method: air_install_methods[0]
|
|
|
|
- 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] }}"
|