diff --git a/states/golang/defaults.yaml b/states/golang/defaults.yaml index 7cc1acf..57252d8 100644 --- a/states/golang/defaults.yaml +++ b/states/golang/defaults.yaml @@ -1,8 +1,9 @@ --- golang: enabled: true - install_dir: /usr/local + install_dir: /usr/local/apps + release_dir: /usr/local/apps/releases mirror: https://dl.google.com/go/ - version: 1.14.2 + version: 1.15.5 os: linux - arch: amd64 \ No newline at end of file + arch: amd64 diff --git a/states/golang/install.sls b/states/golang/install.sls index 7eb5905..597ae1e 100644 --- a/states/golang/install.sls +++ b/states/golang/install.sls @@ -2,17 +2,17 @@ {%- from "golang/map.jinja" import golang with context %} golang-archive-extract: archive.extracted: - - name: {{ golang.install_dir }}/go{{ golang.version }} + - name: {{ golang.release_dir }}/go{{ 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' - - if_missing: {{ golang.install_dir }}/go{{ golang.version }} + - if_missing: {{ golang.release_dir }}/go{{ golang.version }} golang-binary-symlink: file.symlink: - name: {{ golang.install_dir }}/go - - target: {{ golang.install_dir }}/go{{ golang.version }} + - target: {{ golang.release_dir }}/go{{ golang.version }} - force: true - require: - - archive: golang-archive-extract \ No newline at end of file + - archive: golang-archive-extract