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 - name: set go Filename
ansible.builtin.set_fact: 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: tags:
- dev - dev
- go - go
@@ -26,7 +26,7 @@
ansible.builtin.get_url: ansible.builtin.get_url:
dest: "{{ d_go_dl_tmp.path }}/{{ go_archive }}" dest: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
url: "https://go.dev/dl/{{ go_archive }}" url: "https://go.dev/dl/{{ go_archive }}"
checksum: "{{ _go[versions.go].Linux[arch] }}" checksum: "{{ _go[_go.version][ansible_system][arch] }}"
decompress: false decompress: false
tags: tags:
- dev - dev
@@ -39,8 +39,18 @@
state: directory state: directory
- name: extract go package - name: extract go package
become: true
ansible.builtin.unarchive: ansible.builtin.unarchive:
dest: "{{ _go.install_path }}" dest: "{{ _go.install_path }}"
src: "{{ d_go_dl_tmp.path }}/{{ go_archive }}" src: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
remote_src: true 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

View File

@@ -1,38 +1,4 @@
--- ---
- ansible.builtin.include_vars: - name: append to pkgs
file: go.yml set_fact:
name: _go srcpkgs: "{{ srcpkgs + [ 'build/go.yml' ] }}"
- 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

View File

@@ -1,7 +1,7 @@
--- ---
- name: install rust and cargo - name: install rust and cargo
ansible.builtin.include_tasks: ansible.builtin.include_tasks:
file: "{{ ansible_os_family }}/rust.yml" file: "pkgs/{{ ansible_os_family }}/rust.yml"
tags: tags:
- rust - rust
- dependency - dependency
@@ -17,6 +17,7 @@
- libxkbcommon-dev - libxkbcommon-dev
- python3 - python3
- name: add to syspkgs - name: add to pkgs
ansible.builtin.set_fact: ansible.builtin.set_fact:
syspkgs: "{{ syspkgs + alacritty_deps }}" syspkgs: "{{ syspkgs + alacritty_deps }}"
srcpkgs: "{{ srcpkgs + ['build/alacritty.yml'] }}"

View File

@@ -1,5 +1,4 @@
--- ---
- name: append to pkgs - name: append to pkgs
set_fact: set_fact:
srcpkgs: "{{ srcpkgs + [ 'packages/Linux/go.yml' ] }}" srcpkgs: "{{ srcpkgs + [ 'build/go.yml' ] }}"

View File

@@ -5,6 +5,9 @@ archmap:
arm64: arm64 arm64: arm64
aarch64: arm64 aarch64: arm64
x86_64: amd64 x86_64: amd64
extmap:
Darwin: pkg
Linux: tar.gz
1.23.5: 1.23.5:
Darwin: Darwin:
arm64: sha256:f819ed94939e08a5016b9a607ec84ebbde6cb3fe59750c59d97aa300c3fd02df arm64: sha256:f819ed94939e08a5016b9a607ec84ebbde6cb3fe59750c59d97aa300c3fd02df