fix packages
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
become: "{{ sys_pkg_become }}"
|
||||
register: get_url_go
|
||||
ansible.builtin.get_url:
|
||||
dest: "{{ path.cache }}/{{ go.archive }}"
|
||||
url: "{{ go.url }}"
|
||||
dest: "{{ d_tempdir.path }}/{{ go.archive }}"
|
||||
url: "{{ go.base_url }}/{{ go.archive }}"
|
||||
checksum: "{{ go.sum }}"
|
||||
decompress: false
|
||||
mode: '0644'
|
||||
@@ -32,7 +32,7 @@
|
||||
- ansible_system == 'Linux'
|
||||
ansible.builtin.unarchive:
|
||||
dest: "{{ path.prefix }}"
|
||||
src: "{{ d_go_dl_tmp.path }}/{{ go.archive }}"
|
||||
src: "{{ d_tempdir.path }}/{{ go.archive }}"
|
||||
remote_src: true
|
||||
|
||||
- name: Install go macOS using pkg file
|
||||
@@ -40,5 +40,4 @@
|
||||
when:
|
||||
- ansible_distribution == 'MacOSX'
|
||||
ansible.builtin.command:
|
||||
creates: "{{ path.go }}"
|
||||
cmd: "installer -pkg {{ d_go_dl_tmp.path }}/{{ go.archive }} -target /"
|
||||
cmd: "installer -pkg {{ d_tempdir.path }}/{{ go.archive }} -target /"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user