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

@@ -1,38 +1,4 @@
---
- ansible.builtin.include_vars:
file: go.yml
name: _go
- name: set go arch
ansible.builtin.set_fact:
arch: "{{ _go.archmap[ansible_architecture] }}"
- name: set go Filename
ansible.builtin.set_fact:
goFilename: "go{{ versions.go }}.darwin-{{ arch }}.pkg"
tags:
- dev
- go
- name: create temp path
ansible.builtin.tempfile:
state: directory
prefix: go_dl.
register: d_go_dl_tmp
- name: download latest go package for macOS
ansible.builtin.get_url:
dest: "{{ d_go_dl_tmp.path }}/{{ goFilename }}"
url: "https://go.dev/dl/{{ goFilename }}"
checksum: "{{ _go[versions.go].Darwin[arch] }}"
decompress: false
tags:
- dev
- go
- name: install go macOS use pkg file
become: true
ansible.builtin.command:
cmd: "installer -pkg {{ d_go_dl_tmp.path }}/{{ goFilename }} -target /"
tags:
- dev
- go
- name: append to pkgs
set_fact:
srcpkgs: "{{ srcpkgs + [ 'build/go.yml' ] }}"