46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
---
|
|
- name: download zls archive
|
|
ansible.builtin.set_fact:
|
|
zls_path: "zls-{{ pkgconfig_zls.sysmap[ansible_system] }}-{{ pkgconfig_zls.archmap[ansible_architecture] }}-{{ pkgconfig_zls.version }}"
|
|
zls_pkg: "zls-{{ pkgconfig_zls.sysmap[ansible_system] }}-{{ pkgconfig_zls.archmap[ansible_architecture] }}-{{ pkgconfig_zls.version }}.tar.xz"
|
|
|
|
- name: check if zls {{ pkgconfig_zls.version }} exists
|
|
ansible.builtin.stat:
|
|
path: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}/zls"
|
|
register: r_zls_stat
|
|
|
|
- name: update/install zls
|
|
block:
|
|
- name: create temp path
|
|
ansible.builtin.tempfile:
|
|
state: directory
|
|
prefix: zls_dl.
|
|
register: d_zls_dl_tmp
|
|
|
|
- name: download zls archive
|
|
ansible.builtin.get_url:
|
|
dest: "{{ d_zls_dl_tmp.path }}/{{ zls_pkg }}"
|
|
url: "{{ pkgconfig_zls.base_url }}/{{ zls_pkg }}"
|
|
decompress: false
|
|
|
|
- name: create install_path
|
|
ansible.builtin.file:
|
|
state: directory
|
|
path: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}"
|
|
become: true
|
|
|
|
- name: extract zls package
|
|
ansible.builtin.unarchive:
|
|
dest: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}"
|
|
src: "{{ d_zls_dl_tmp.path }}/{{ zls_pkg }}"
|
|
remote_src: true
|
|
become: true
|
|
|
|
- name: link zls binary
|
|
ansible.builtin.file:
|
|
state: link
|
|
src: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}/zls"
|
|
path: "{{ pkgconfig_zls.install_prefix }}/bin/zls"
|
|
become: true
|
|
when: not r_zls_stat.stat.exists
|