# vim: set filetype=yaml.ansible : # ## Package: bashls ## Description: language server for bash (sh compatible) ## Version: latest ## Methods: source ## Helpers: npm --- - name: Set bashls default facts # {{{ ansible.builtin.set_fact: bashls: methods: - source npm_pkg: name: bash-language-server global: true version: latest # }}} - name: Configure bashls when: - "'bashls' not in __configured" block: - name: Set bashls install method when: - bashls_imethod is undefined ansible.builtin.set_fact: bashls_imethod: "{{ imethod if imethod in bashls.methods else bashls.methods[0] }}" - name: Configure bashls source install when: - bashls_imethod == 'source' block: - name: Set bashls npm_pkg config ansible.builtin.set_fact: bashls_npm_pkg: name: "{{ bashls.npm_pkg.name }}" global: "{{ bashls.npm_pkg.global }}" version: "{{ bashls_version | default(bashls.npm_pkg.version) }}" - name: Append bashls to pkg_npm ansible.builtin.set_fact: pkg_npm: "{{ pkg_npm + [bashls_npm_pkg] }}" - name: Finalise bashls source install ansible.builtin.set_fact: bashls_install: "{{ bashls_imethod }}={{ bashls_npm_pkg }}" - name: Set bashls_configured ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'bashls': bashls_install } ) }}"