adjusting variable names, fixing errors
This commit is contained in:
@@ -6,25 +6,25 @@
|
||||
## Methods: source
|
||||
## Helpers: go_install
|
||||
---
|
||||
- name: Set default bufls options
|
||||
- name: Set default bufls options # {{{
|
||||
ansible.builtin.set_fact:
|
||||
bufls:
|
||||
install_methods:
|
||||
methods:
|
||||
- source
|
||||
version: latest
|
||||
go_pkg: github.com/bufbuild/buf-language-server/cmd/bufls
|
||||
|
||||
# }}}
|
||||
- name: Configure bufls install
|
||||
when:
|
||||
- "'bufls' not in __configured"
|
||||
block:
|
||||
- name: Set bufls install method
|
||||
ansible.builtin.set_fact:
|
||||
bufls_install_method: "{{ install_method if install_method in bufls.install_methods else bufls.install_methods[0] }}"
|
||||
bufls_imethod: "{{ imethod if imethod in bufls.methods else bufls.methods[0] }}"
|
||||
|
||||
- name: Configure bufls source install
|
||||
when:
|
||||
- bufls_install_method == 'source'
|
||||
- bufls_imethod == 'source'
|
||||
block:
|
||||
- name: Configure bufls go install
|
||||
ansible.builtin.set_fact:
|
||||
@@ -32,6 +32,14 @@
|
||||
url: "{{ bufls.go_pkg }}@{{ bufls.version }}"
|
||||
bin: "{{ path_bin }}/bufls"
|
||||
|
||||
- name: Queue bufls go install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [bufls_go_install] }}"
|
||||
|
||||
- name: Finalise bufls go install
|
||||
ansible.builtin.set_fact:
|
||||
bufls_install: "{{ bufls_imethod }}={{ bufls_go_install }}"
|
||||
|
||||
- name: Finalise bufls configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'bufls': bufls_install_method } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'bufls': bufls_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user