make adjustments before flattening files

This commit is contained in:
Matthew Stobbs
2025-01-22 20:22:47 -07:00
parent 34c290f522
commit 852331a692
5 changed files with 23 additions and 44 deletions

View File

@@ -9,7 +9,7 @@
- name: set go Filename
ansible.builtin.set_fact:
go_archive: "go{{ _go.version }}.linux-{{ arch }}.tar.gz"
go_archive: "go{{ _go.version }}.{{ ansible_system | lower }}-{{ arch }}.{{ _go.extmap[ansible_system] }}"
tags:
- dev
- go
@@ -26,7 +26,7 @@
ansible.builtin.get_url:
dest: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
url: "https://go.dev/dl/{{ go_archive }}"
checksum: "{{ _go[versions.go].Linux[arch] }}"
checksum: "{{ _go[_go.version][ansible_system][arch] }}"
decompress: false
tags:
- dev
@@ -39,8 +39,18 @@
state: directory
- name: extract go package
become: true
ansible.builtin.unarchive:
dest: "{{ _go.install_path }}"
src: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
remote_src: true
when: ansible_system == 'Linux'
become: true
- name: install go macOS use pkg file
ansible.builtin.command:
cmd: "installer -pkg {{ d_go_dl_tmp.path }}/{{ goFilename }} -target /"
when: ansible_system == 'Darwin'
become: true
tags:
- dev
- go