Add setup for kubectl and helm
the kubeconfig is copied from the cluster config directory to ~/.kube/config.
Also, the playbook runs kubectl and helm roles to install tools.
Change-Id: I29ee98f6502bbb7923b1ae6812dd642ca206dbce
Issue-ID: OOM-1778
Signed-off-by: Petr OspalĂ˝ <p.ospaly@partner.samsung.com>
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
diff --git a/ansible/roles/rke/tasks/rke_deploy.yml b/ansible/roles/rke/tasks/rke_deploy.yml
index 7b3e251..9983d08 100644
--- a/ansible/roles/rke/tasks/rke_deploy.yml
+++ b/ansible/roles/rke/tasks/rke_deploy.yml
@@ -3,3 +3,15 @@
command: "{{ rke_bin_dir }}/rke up --config cluster.yml"
args:
chdir: "{{ cluster_config_dir }}"
+
+- name: Ensure .kube directory is present
+ file:
+ path: "{{ kube_config_dir }}"
+ state: directory
+
+- name: Setup kubeconfig
+ copy:
+ src: "{{ cluster_config_dir }}/kube_config_cluster.yml"
+ dest: "{{ kube_config_dir }}/config"
+ remote_src: true
+ mode: 0755