fixing issues

This commit is contained in:
Matthew Stobbs
2025-02-22 16:09:47 -07:00
parent d1e8957f94
commit a73ed77dac
17 changed files with 63 additions and 68 deletions

View File

@@ -13,11 +13,10 @@
- name: Install/update go
when:
- do_go_install or
- (do_go_install is defined and do_go_install) or
not stat_path_go.stat.exists
block:
- name: Download go archive
become: "{{ sys_pkg_become }}"
register: get_url_go
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/{{ go.archive }}"
@@ -31,7 +30,7 @@
when:
- ansible_system == 'Linux'
ansible.builtin.unarchive:
dest: "{{ path.prefix }}"
dest: "{{ go.prefix }}"
src: "{{ d_tempdir.path }}/{{ go.archive }}"
remote_src: true
@@ -40,4 +39,4 @@
when:
- ansible_distribution == 'MacOSX'
ansible.builtin.command:
cmd: "installer -pkg {{ d_tempdir.path }}/{{ go.archive }} -target /"
cmd: "installer -pkg {{ d_tempdir.path }}/{{ go.archive }} -target {{ go.prefix }}"

View File

@@ -1,42 +1,38 @@
# vim: set filetype=yaml.ansible :
---
- name: Download zig archive
ansible.builtin.set_fact:
zig_path: "zig-{{ pkgconfig_zig.sysmap[ansible_system] }}-{{ pkgconfig_zig.archmap[ansible_architecture] }}-{{ pkgconfig_zig.version }}"
zig_pkg: "zig-{{ pkgconfig_zig.sysmap[ansible_system] }}-{{ pkgconfig_zig.archmap[ansible_architecture] }}-{{ pkgconfig_zig.version }}.tar.xz"
- name: Check if zig exists
ansible.builtin.stat:
path: "{{ pkgconfig_zig.install_path }}/{{ zig_path }}/zig"
path: "{{ path.archive }}/zig/{{ zig.path }}/zig"
register: r_zig_stat
- name: Update/install zig
when:
- not r_zig_stat.stat.exists
block:
- name: Create temp path
ansible.builtin.tempfile:
state: directory
prefix: zig_dl.
register: d_zig_dl_tmp
- name: Download zig archive
ansible.builtin.get_url:
dest: "{{ d_zig_dl_tmp.path }}/{{ zig_pkg }}"
url: "{{ pkgconfig_zig.base_url }}/{{ pkgconfig_zig.version }}/{{ zig_pkg }}"
dest: "{{ d_tempdir.path }}/{{ zig.pkg }}"
url: "{{ zig.base_url }}/{{ zig.vers }}/{{ zig.pkg }}"
decompress: false
mode: '0644'
- name: Create zig archive dir
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ path.archive }}/zig"
- name: Extract zig package
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}/zig"
src: "{{ d_zig_dl_tmp.path }}/{{ zig_pkg }}"
src: "{{ d_tempdir.path }}/{{ zig.pkg }}"
remote_src: true
- name: Link zig binary
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.archive }}/{{ zig_path }}/zig"
src: "{{ path.archive }}/zig/{{ zig.path }}/zig"
path: "{{ path.bin }}/zig"

View File

@@ -1,32 +1,37 @@
# vim: set filetype=yaml.ansible :
---
- name: Download zls archive
ansible.builtin.set_fact:
- name: Check if zls exists
ansible.builtin.stat:
path: "{{ path.archive }}/{{ zls_path }}/zls"
path: "{{ path.archive }}/zls/{{ zls.path }}/zls"
register: r_zls_stat
- name: Update/install zls
block:
- name: Download zls archive
register: get_url_zls
ansible.builtin.get_url:
dest: "{{ d_tempfile.path }}/{{ zls_pkg }}"
url: "{{ zls.base_url }}/{{ zls_pkg }}"
dest: "{{ d_tempdir.path }}/{{ zls.pkg }}"
url: "{{ zls.base_url }}/{{ zls.pkg }}"
decompress: false
mode: '0644'
- name: Create zls archive dir
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ path.archive }}/zls/{{ zls.path }}"
- name: Extract zls package
become: "{{ ext_become }}"
ansible.builtin.unarchive:
dest: "{{ path.archive }}"
src: "{{ d_tempfile.path }}/{{ zls_pkg }}"
dest: "{{ path.archive }}/zls/{{ zls.path }}"
src: "{{ d_tempdir.path }}/{{ zls.pkg }}"
remote_src: true
- name: Link zls binary
become: "{{ ext_become }}"
ansible.builtin.file:
state: link
src: "{{ path.archive }}/{{ zls_path }}/zls"
src: "{{ path.archive }}/zls/{{ zls.path }}/zls"
path: "{{ path.bin }}/zls"