Files
ansible_role_package/tasks/pkgs/ansible_ls.yml
Matthew Stobbs b6f7ba485b fix ansible_ls
2026-02-10 19:37:54 -07:00

30 lines
1.0 KiB
YAML

# vim: set filetype=yaml.ansible :
---
- name: Configure ansible_ls
when:
- "'ansible_ls' not in __configured"
block:
- name: Set ansible_ls install method
when:
- ansible_ls_install_method is undefined
ansible.builtin.set_fact:
ansible_ls_install_method: "{{ install_method if install_method in ansible_ls_install_methods else ansible_ls_install_methods[0] }}"
- name: Append ansible-language-server to pkg_npm
when:
- ansible_ls_install_method == 'source'
block:
- name: Load required installation dependencies
loop: "{{ ansible_ls_pkg_deps }}"
loop_control:
loop_var: pkgdep
ansible.builtin.include_tasks: "{{ pkgdep }}"
- name: Append ansible ls to pkg_npm
ansible.builtin.set_fact:
pkg_npm: "{{ pkg_npm + [ansible_npm_pkg] }}"
- name: Set ansible_ls_configured
ansible.builtin.set_fact:
__configured: "{{ __configured | combine( { 'ansible_ls': true } ) }}"