32 lines
1019 B
YAML
32 lines
1019 B
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: "{% 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: Set air install package
|
|
ansible.builtin.set_fact:
|
|
air_pkg: "{{ air_install_url }}@{{ air_version }}"
|
|
|
|
- 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] }}"
|