# vim: set filetype=yaml.ansible : # ## Package: bufls ## Description: a language server for protocol buffers ## Version: latest ## Methods: source ## Helpers: go_install --- - name: Set default bufls options # {{{ ansible.builtin.set_fact: bufls: 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_imethod: "{{ imethod if imethod in bufls.methods else bufls.methods[0] }}" - name: Configure bufls source install when: - bufls_imethod == 'source' block: - name: Configure bufls go install ansible.builtin.set_fact: bufls_go_install: 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 } ) }}"