ansible-playbook-bundle icon indicating copy to clipboard operation
ansible-playbook-bundle copied to clipboard

Set KUBECONFIG to the $HOME/.kube/config if missing

Open rgolangh opened this issue 7 years ago • 2 comments

To support root or non-root docker invocations, set the KUBECONFIG specifically to the passed .kube dir. The reason is that 'oc' incovation as root is by default looking for the .kube dir uner /root/.kube/config where as non-root is looking at $HOME/.kube/config.

With this we always set KUBECONFIG, so root invocation of oc commands will always find the passed in config.

Fixes: https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/issues/298

rgolangh avatar Jul 23 '18 11:07 rgolangh

@dymurray please review

rgolangh avatar Jul 23 '18 12:07 rgolangh

Looks good, thanks for submitting.

dymurray avatar Jul 25 '18 20:07 dymurray