made gbt state to honoer username pillar
This commit is contained in:
parent
c9c1faef0a
commit
b1822e1cdb
@ -3,16 +3,16 @@
|
|||||||
|
|
||||||
Make sure go directory exists:
|
Make sure go directory exists:
|
||||||
file.directory:
|
file.directory:
|
||||||
- name: {{ salt['user.info']( pillar['user']['username']).home }}/go
|
- name: {{ salt['user.info']( pillar['username']).home }}/go
|
||||||
- user: {{ pillar['user']['username'] }}
|
- user: {{ pillar['username'] }}
|
||||||
- group: users
|
- group: users
|
||||||
- mode: "0755"
|
- mode: "0755"
|
||||||
|
|
||||||
{% if not salt['file.directory_exists']('{}/go/src/github.com/jtyr/gbt'.format(salt['user.info']( pillar['user']['username']).home)) %}
|
{% if not salt['file.directory_exists']('{}/go/src/github.com/jtyr/gbt'.format(salt['user.info']( pillar'username']).home)) %}
|
||||||
Go get GBT:
|
Go get GBT:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: go get github.com/jtyr/gbt/cmd/gbt
|
- name: go get github.com/jtyr/gbt/cmd/gbt
|
||||||
- runas: {{ pillar['user']['username'] }}
|
- runas: {{ pillar['username'] }}
|
||||||
- env:
|
- env:
|
||||||
- GOPATH: {{ salt['user.info']( pillar['user']['username']).home }}/go
|
- GOPATH: {{ salt['user.info']( pillar['username']).home }}/go
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user