Skip to content

Commit

Permalink
pkg/ansible; Append current environment vars to runner (operator-fram…
Browse files Browse the repository at this point in the history
…ework#888)

* pkg/ansible; Append current environment vars to runner

* Flip order of env statements
  • Loading branch information
dymurray authored and mhrivnak committed Jan 8, 2019
1 parent 534f051 commit d826c3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/ansible/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ func (r *runner) Run(ident string, u *unstructured.Unstructured, kubeconfig stri
} else {
dc = r.cmdFunc(ident, inputDir.Path)
}
// Append current environment since setting dc.Env to anything other than nil overwrites current env
dc.Env = append(dc.Env, os.Environ()...)
dc.Env = append(dc.Env, fmt.Sprintf("K8S_AUTH_KUBECONFIG=%s", kubeconfig), fmt.Sprintf("KUBECONFIG=%s", kubeconfig))

output, err := dc.CombinedOutput()
Expand Down

0 comments on commit d826c3c

Please sign in to comment.