diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-03-05 16:37:39 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2015-03-06 15:53:51 -0500 |
commit | f744401ae8b1968bc0d404f5cb5504c492a2f0aa (patch) | |
tree | 5d07d5f523a96107fd1cbd110d40a88b59392561 /roles/openshift_node/tasks | |
parent | 3aed7219448ab99377643c71d05f2a26b6e11c99 (diff) | |
download | openshift-f744401ae8b1968bc0d404f5cb5504c492a2f0aa.tar.gz openshift-f744401ae8b1968bc0d404f5cb5504c492a2f0aa.tar.bz2 openshift-f744401ae8b1968bc0d404f5cb5504c492a2f0aa.tar.xz openshift-f744401ae8b1968bc0d404f5cb5504c492a2f0aa.zip |
Do not set KUBECONFIG for root user
- instead of setting KUBECONFIG, copy the admin kubeconfig to
/root/.kube/.kubeconfig in the openshift_master and openshift_node roles
- pause for 30 seconds if the openshift-master service has changed state,
since the file we are copying is generated by the master
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index de010bd0c..56858dbc3 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -62,6 +62,21 @@ service: name=openshift-node enabled=false when: openshift_node_manage_service_externally +# TODO: create an os_vars role that has generic env related config and move +# the root kubeconfig setting there, cannot use dependencies to force ordering +# with openshift_node and openshift_master because the way conditional +# dependencies work with current ansible would also exclude the +# openshift_common dependency. +- name: Create .kube directory + file: + path: /root/.kube + state: directory + mode: 700 +- name: Configure root user kubeconfig + command: cp /var/lib/openshift/openshift.local.certificates/admin/.kubeconfig /root/.kube/.kubeconfig + args: + creates: /root/.kube/.kubeconfig + # TODO: expose openshift_register_node options to allow for overriding the # defaults. - name: Register node (if not already registered) |