make the packages role more generic

This commit is contained in:
Matthew Stobbs
2025-01-18 09:24:11 -07:00
parent 3d466e64c7
commit 333ee4c3f5
112 changed files with 1610 additions and 3 deletions

35
tasks/Darwin/go.yml Normal file
View File

@@ -0,0 +1,35 @@
---
- name: Set go Filename
ansible.builtin.set_fact:
goFilename: "go{{ go.version }}.darwin-{{ arch[ansible_architecture] }}.{{ go.darwin.extension }}"
tags:
- dev
- go
- name: Download latest go package for MacOS
become: true
ansible.builtin.get_url:
dest: "/tmp/{{ goFilename }}"
url: "https://go.dev/dl/{{ goFilename }}"
checksum: "sha256:{{ go.darwin.sum[ansible_architecture] }}"
decompress: false
tags:
- dev
- go
- 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
tags:
- dev
- go