41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: dockerls
|
|
## Description: language server for Dockerfiles/Containerfiles
|
|
## Version: latest
|
|
## Methods: source
|
|
## Helpers: npm
|
|
---
|
|
- name: Set dockerls default facts
|
|
ansible.builtin.set_fact:
|
|
dockerls:
|
|
install_methods:
|
|
- source
|
|
npm_pkg: dockerfile-language-server-nodejs
|
|
|
|
- name: Configure dockerls
|
|
when:
|
|
- "'dockerls' not in _configured"
|
|
block:
|
|
- name: Set dockerls install method
|
|
when:
|
|
- dockerls_install_method is undefined
|
|
ansible.builtin.set_fact:
|
|
dockerls_install_method: "{{ install_method if install_method in dockerls.install_methods else dockerls.install_methods[0] }}"
|
|
|
|
- name: Configure dockerls source install
|
|
when:
|
|
- dockerls_install_method == 'source'
|
|
block:
|
|
- name: Configure dockerls npm install
|
|
ansible.builtin.set_fact:
|
|
dockerls_npm_install:
|
|
name: "{{ dockerls.npm_pkg }}"
|
|
- name: Queue dockerls installation
|
|
ansible.builtin.set_fact:
|
|
pkg_npm: "{{ pkg_npm + [dockerls_npm_install] }}"
|
|
|
|
- name: Finalise dockerls configuration
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'dockerls': dockerls_install_method } ) }}"
|