ansibleplaybookbundle / ansible-playbook-bundle

THIS REPO IS MIGRATING: https://github.com/automationbroker/apb
GNU General Public License v2.0
140 stars 70 forks source link

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

Closed rgolangh closed 5 months ago

rgolangh commented 6 years ago

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 commented 6 years ago

@dymurray please review

dymurray commented 6 years ago

Looks good, thanks for submitting.