fix packages

This commit is contained in:
Matthew Stobbs
2025-02-22 14:59:18 -07:00
parent 2d825d855d
commit d1e8957f94
47 changed files with 166 additions and 129 deletions

View File

@@ -2,41 +2,31 @@
---
- 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 exists
ansible.builtin.stat:
path: "{{ pkgconfig_zls.install_path }}/{{ zls_path }}/zls"
path: "{{ path.archive }}/{{ zls_path }}/zls"
register: r_zls_stat
- name: Update/install zls
when:
- not r_zls_stat.stat.exists
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 }}"
dest: "{{ d_tempfile.path }}/{{ zls_pkg }}"
url: "{{ zls.base_url }}/{{ zls_pkg }}"
decompress: false
mode: '0644'
- name: Extract zls package
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.ardhive }}/{{ zls_path }}"
src: "{{ d_zls_dl_tmp.path }}/{{ zls_pkg }}"
dest: "{{ path.archive }}"
src: "{{ d_tempfile.path }}/{{ zls_pkg }}"
remote_src: true
- name: Link zls binary
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.ardhive }}/{{ zls_path }}/zls"
src: "{{ path.archive }}/{{ zls_path }}/zls"
path: "{{ path.bin }}/zls"