1 Star 0 Fork 196

京客隆 / saltops

forked from 吴文豪 / saltops 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
golang.sls 903 Bytes
一键复制 编辑 原始数据 按行查看 历史
wwh529280602@live.cn 提交于 2017-02-11 18:41 . 新增Golang部署模板
send_file:
file.managed:
- name: /tmp/go${version}.linux-amd64.tar.gz
- source: salt://go${version}.linux-amd64.tar.gz
- unless: test -f /tmp/go${version}.linux-amd64.tar.gz
extract_file:
cmd.run:
- name: tar -xvf ./go${version}.linux-amd64.tar.gz
- cwd: /tmp
- unless: test -d /tmp/go
- require:
- file: send_file
move_go:
cmd.run:
- name: mv /tmp/go /opt/
- unless: test -d /opt/go/
- require:
- cmd: extract_file
make_gopath:
cmd.run:
- name: mkdir /opt/gopath
- unless: test -d /opt/gopath/
- require:
- cmd: move_go
change_env:
cmd.run:
- name: echo 'GO_HOME=/opt/go \n PATH=$GO_HOME/bin:$PATH \n export GO_HOME \n GO_PATH=/opt/gopath \n export PATH' >> /etc/profile
- user: root
- unless: cat /etc/profile|grep GO_HOME
- require:
- cmd: make_gopath
Python
1
https://gitee.com/wmsj_com/saltops.git
git@gitee.com:wmsj_com/saltops.git
wmsj_com
saltops
saltops
master

搜索帮助