# vim: set filetype=yaml.ansible : --- - 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" 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 }}" 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 }}" remote_src: true - name: Link zls binary become: "{{ ext_become }}" ansible.builtin.file: state: link src: "{{ path.ardhive }}/{{ zls_path }}/zls" path: "{{ path.bin }}/zls"