Files
ansible_role_package/tasks/pkgs/bashls.yml
Matthew Stobbs 692e9dd99a start developing module for go_install
not going to be used for a long time
Making pkg tasks truly single file
2026-03-03 21:35:46 -07:00

48 lines
1.4 KiB
YAML

# vim: set filetype=yaml.ansible :
#
## Package: bashls
## Description: language server for bash (sh compatible)
## Version: latest
## Methods:
## - source (npm)
## Helpers: npm
---
- name: Set bashls default facts # {{{
ansible.builtin.set_fact:
bashls:
install_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_install_method is undefined
ansible.builtin.set_fact:
bashls_install_method: "{{ install_method if install_method in bashls.install_methods else bashls.install_methods[0] }}"
- name: Configure bashls source install
when:
- bashls_install_method == '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: Set bashls_configured
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'bashls': bashls_install_method } ) }}"