fixing and adding packages

This commit is contained in:
Matthew Stobbs
2025-01-18 16:00:26 -07:00
parent 333ee4c3f5
commit 985da518b4
114 changed files with 555 additions and 498 deletions

View File

@@ -1,35 +1,35 @@
---
- name: Set go Filename
- name: set go arch
ansible.builtin.set_fact:
goFilename: "go{{ go.version }}.darwin-{{ arch[ansible_architecture] }}.{{ go.darwin.extension }}"
arch: "{% if ansible_archtecture == 'aarch64' %}arm64{% else %}amd64{% endif %}"
- name: set go Filename
ansible.builtin.set_fact:
goFilename: "go{{ versions.go }}.darwin-{{ arch }}.pkg"
tags:
- dev
- go
- name: Download latest go package for MacOS
become: true
- 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: "/tmp/{{ goFilename }}"
dest: "{{ d_go_dl_tmp.path }}/{{ goFilename }}"
url: "https://go.dev/dl/{{ goFilename }}"
checksum: "sha256:{{ go.darwin.sum[ansible_architecture] }}"
checksum: "{{ _go[versions.go].Darwin[arch] }}"
decompress: false
tags:
- dev
- go
- name: Install go MacOS use pkg file
- name: install go macOS use pkg file
become: true
ansible.builtin.command:
cmd: "installer -pkg /tmp/{{ goFilename }} -target /"
tags:
- dev
- go
- name: Cleanup go package download
become: true
ansible.builtin.file:
path: "/tmp/{{ goFilename }}"
state: absent
cmd: "installer -pkg {{ d_go_dl_tmp.path }}/{{ goFilename }} -target /"
tags:
- dev
- go