paulbsd-salt/states/golang/install.sls
Paul Lecuq 4b9abc1c3f
Some checks failed
continuous-integration/drone/push Build is failing
updated states
2025-02-19 20:39:43 +01:00

28 lines
906 B
Plaintext

---
{%- from "golang/map.jinja" import golang with context %}
golang-archive-extract:
archive.extracted:
- name: {{ golang.release_dir }}/golang-{{ golang.version }}
- source: {{ golang.mirror }}/go{{ golang.version }}.{{ golang.os }}-{{ golang.arch }}.tar.gz
- skip_verify: true
- enforce_toplevel: false
- options: --transform 's/^go\///g'
- user: root
- group: root
- enforce_ownership_on: {{ golang.release_dir }}/golang-{{ golang.version }}
- if_missing: {{ golang.release_dir }}/golang-{{ golang.version }}
golang-binary-symlink:
file.symlink:
- name: {{ golang.install_dir }}/golang
- target: {{ golang.release_dir }}/golang-{{ golang.version }}
- force: true
- require:
- archive: golang-archive-extract
golang-cleanup:
software.cleanup:
- name: golang
- path: {{ golang.release_dir }}
- version: "{{ golang.version }}"