fix ansible_ls
This commit is contained in:
@@ -2,30 +2,28 @@
|
||||
---
|
||||
- name: Configure ansible_ls
|
||||
when:
|
||||
- __ansible_ls_configured is undefined
|
||||
- "'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: "{% if install_method in ansible_ls_install_methods %}{{ install_method }}{% else %}{{ ansible_ls_install_methods[0] }}{% endif %}"
|
||||
|
||||
- name: Configure ansible_ls source npm installation
|
||||
when:
|
||||
- ansible_ls_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
ansible_npm_pkg:
|
||||
name: '@ansible/ansible-language-server'
|
||||
global: true
|
||||
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'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_npm: "{{ pkg_npm + [ansible_npm_pkg] }}"
|
||||
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
|
||||
when:
|
||||
- __ansible_ls_configured is undefined
|
||||
ansible.builtin.set_fact:
|
||||
__ansible_ls_configured: true
|
||||
__configured: "{{ __configured | combine( { 'ansible_ls': true } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user