add ansible and bashls
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Set go configuration
|
||||
ansible.builtin.set_fact:
|
||||
go:
|
||||
method: archive
|
||||
arch: "{{ pkgconfig.go.archmap[ansible_architecture] }}"
|
||||
ext: "{{ pkgconfig.go.extmap[ansible_system] }}"
|
||||
sys: "{{ ansible_system | lower }}"
|
||||
vers: "{{ pkgconfig.go.version }}"
|
||||
|
||||
- name: Set go composite facts
|
||||
ansible.builtin.set_fact:
|
||||
go:
|
||||
method: archive
|
||||
arch: "{{ go.arch }}"
|
||||
archive: "go{{ go.vers }}.{{ go.sys }}-{{ go.arch }}.{{ pkgconfig.go.extmap[ansible_system] }}"
|
||||
ext: "{{ go.ext }}"
|
||||
prefix: "{% if ansible_distribution == 'MacOSX' %}/{% else %}{{ path.prefix }}{% endif %}"
|
||||
sum: "{{ pkgconfig.go.sums[go.vers][ansible_system][go.arch] }}"
|
||||
sys: "{{ go.sys }}"
|
||||
base_url: "{{ pkgconfig.go.base_url }}"
|
||||
vers: "{{ go.vers }}"
|
||||
@@ -2,28 +2,26 @@
|
||||
---
|
||||
- name: Configure ansible
|
||||
when:
|
||||
- __ansible_configured is undefined or
|
||||
not __ansible_configured
|
||||
- "'ansible' not in __configured"
|
||||
block:
|
||||
- name: Set ansible install method
|
||||
when:
|
||||
- ansible_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
ansible_install_method: "{% if install_method in ansible_install_methods %}{{ install_method }}{% else %}{{ ansible_install_methods[0] }}{% endif %}"
|
||||
ansible_pkgname:
|
||||
RedHat: ansible
|
||||
Debian: ansible
|
||||
Alpine: ansible
|
||||
Archlinux: ansible
|
||||
|
||||
- name: Append ansible to system package manager install list
|
||||
when:
|
||||
- ansible_install_method == 'system'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}"
|
||||
|
||||
- name: Append ansible to pipx install list
|
||||
when:
|
||||
- ansible_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_pipx: "{{ pkg_pipx + [ansible_pip_pkgname] }}"
|
||||
|
||||
- name: Complete ansible configuration
|
||||
ansible.builtin.set_fact:
|
||||
__ansible_configured: true
|
||||
|
||||
- name: Append ansible to system package manager install list
|
||||
when:
|
||||
- ansible_install_method == 'system'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}"
|
||||
|
||||
- name: Append ansible to pipx install list
|
||||
__configured: "{{ __configured | combine( { 'ansible': true } ) }}"
|
||||
|
||||
@@ -2,12 +2,20 @@
|
||||
---
|
||||
- name: Add bashls
|
||||
when:
|
||||
- bashls_configured is undefined
|
||||
- "'bashls' not in __configured"
|
||||
block:
|
||||
- name: Append bash-language-server to pkg_npm
|
||||
- name: Set bashls install method
|
||||
when:
|
||||
- bashls_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_npm: "{{ pkg_npm + ['bash-language-server'] }}"
|
||||
bashls_install_method: "{% if install_method in bashls_install_methods %}{{ install_method }}{% else %}{{ bashls_install_methods[0] }}{% endif %}"
|
||||
|
||||
- name: Append bash-language-server to pkg_npm
|
||||
when:
|
||||
- bashls_install_method == 'source'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_npm: "{{ pkg_npm + [bashls_npm_pkgname] }}"
|
||||
|
||||
- name: Set bashls_configured
|
||||
ansible.builtin.set_fact:
|
||||
bashls_configured: true
|
||||
__configured: "{{ __configured | combine( { 'bashls': true } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user