restructuring for easier maintenance
- creating src packages when things can't be installed via actual system package - neovim srcpkg is being worked on now
This commit is contained in:
46
tasks/build/go.yml
Normal file
46
tasks/build/go.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
- ansible.buildin.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:
|
||||
go_archive: "go{{ _go.version }}.linux-{{ arch }}.tar.gz"
|
||||
tags:
|
||||
- dev
|
||||
- go
|
||||
- debug
|
||||
|
||||
- name: create temp path
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
prefix: go_dl.
|
||||
register: d_go_dl_tmp
|
||||
|
||||
- name: download go archive
|
||||
become: true
|
||||
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] }}"
|
||||
decompress: false
|
||||
tags:
|
||||
- dev
|
||||
- go
|
||||
|
||||
- name: ensure go install dir exists
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: "{{ _go.install_path }}"
|
||||
state: directory
|
||||
|
||||
- name: extract go package for Linux
|
||||
become: true
|
||||
ansible.builtin.unarchive:
|
||||
dest: "{{ _go.install_path }}"
|
||||
src: "{{ d_go_dl_tmp.path }}/{{ go_archive }}"
|
||||
remote_src: true
|
||||
Reference in New Issue
Block a user