added GoBulletTrain
This commit is contained in:
parent
712a510a8e
commit
9c2b4e195f
3
salt/README.md
Normal file
3
salt/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
```
|
||||
sudo salt-call --local "$@"
|
||||
```
|
@ -4,3 +4,5 @@ packages:
|
||||
curl:
|
||||
htop:
|
||||
terminator:
|
||||
borgbackup:
|
||||
go:
|
||||
|
@ -1,5 +1,6 @@
|
||||
base:
|
||||
'*':
|
||||
- user
|
||||
- packages
|
||||
- repositories
|
||||
|
||||
|
2
salt/pillars/user.sls
Normal file
2
salt/pillars/user.sls
Normal file
@ -0,0 +1,2 @@
|
||||
user:
|
||||
username: jonas
|
18
salt/states/gbt.sls
Normal file
18
salt/states/gbt.sls
Normal file
@ -0,0 +1,18 @@
|
||||
# Install GoBulleTrain,
|
||||
# Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
|
||||
|
||||
Make sure go directory exists:
|
||||
file.directory:
|
||||
- name: {{ salt['user.info']( pillar['user']['username']).home }}/go
|
||||
- user: {{ pillar['user']['username'] }}
|
||||
- group: users
|
||||
- mode: "0755"
|
||||
|
||||
{% if not salt['file.directory_exists']('{}/go/src/github.com/jtyr/gbt'.format(salt['user.info']( pillar['user']['username']).home)) %}
|
||||
Go get GBT:
|
||||
cmd.run:
|
||||
- name: go get github.com/jtyr/gbt/cmd/gbt
|
||||
- runas: {{ pillar['user']['username'] }}
|
||||
- env:
|
||||
- GOPATH: {{ salt['user.info']( pillar['user']['username']).home }}/go
|
||||
{% endif %}
|
@ -2,3 +2,4 @@ base:
|
||||
'*':
|
||||
- repositories
|
||||
- packages
|
||||
- gbt
|
||||
|
Loading…
Reference in New Issue
Block a user