From b1822e1cdb50b672abc46a0e5693ef3353c2bc64 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Sat, 1 Aug 2020 15:08:06 +0200 Subject: [PATCH] made gbt state to honoer username pillar --- salt/states/gbt.sls | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/salt/states/gbt.sls b/salt/states/gbt.sls index 70dbbf9..c90a9fa 100644 --- a/salt/states/gbt.sls +++ b/salt/states/gbt.sls @@ -3,16 +3,16 @@ Make sure go directory exists: file.directory: - - name: {{ salt['user.info']( pillar['user']['username']).home }}/go - - user: {{ pillar['user']['username'] }} + - name: {{ salt['user.info']( pillar['username']).home }}/go + - user: {{ pillar['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)) %} +{% if not salt['file.directory_exists']('{}/go/src/github.com/jtyr/gbt'.format(salt['user.info']( pillar'username']).home)) %} Go get GBT: cmd.run: - name: go get github.com/jtyr/gbt/cmd/gbt - - runas: {{ pillar['user']['username'] }} + - runas: {{ pillar['username'] }} - env: - - GOPATH: {{ salt['user.info']( pillar['user']['username']).home }}/go + - GOPATH: {{ salt['user.info']( pillar['username']).home }}/go {% endif %}