github.com/deemoprobe/k8s-first-commit@v0.0.0-20230430165612-a541f1982be3/src/saltbase/salt/golang.sls (about) 1 {% set go_version = '1.2' %} 2 {% set go_arch = 'linux-amd64' %} 3 {% set go_archive = 'go%s.%s.tar.gz' | format(go_version, go_arch) %} 4 {% set go_url = 'https://go.googlecode.com/files/' + go_archive %} 5 {% set go_hash = 'md5=68901bbf8a04e71e0b30aa19c3946b21' %} 6 7 8 get-golang: 9 file.managed: 10 - name: /var/cache/{{ go_archive }} 11 - source: {{ go_url }} 12 - source_hash: {{ go_hash }} 13 cmd.wait: 14 - cwd: /usr/local 15 - name: tar xzf /var/cache/{{ go_archive }} 16 - watch: 17 - file: get-golang 18 19 install-golang: 20 file.symlink: 21 - name: /usr/local/bin/go 22 - target: /usr/local/go/bin/go 23 - watch: 24 - cmd: get-golang