From 369aed9ea1c189e0b150e172e7922c6af44d1532 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 10 Dec 2022 20:30:25 +0100 Subject: [PATCH] copy kubeconfig --- inventory/group_vars/local | 1 + scaleway-k8s/tasks/kubeconfig.yml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/inventory/group_vars/local b/inventory/group_vars/local index a2e1a52..0bd4efb 100644 --- a/inventory/group_vars/local +++ b/inventory/group_vars/local @@ -1,5 +1,6 @@ project_terraform: "/home/valentin/terraform" project_backend: "/home/valentin/k8s_backend" +project_kubeconfig: "/home/valentin/.kube/config" region_k8s: "fr-par" project_name_tf: "terraform-test" quarkus_project: "covas-quarkus" diff --git a/scaleway-k8s/tasks/kubeconfig.yml b/scaleway-k8s/tasks/kubeconfig.yml index 310f3c4..77561a3 100644 --- a/scaleway-k8s/tasks/kubeconfig.yml +++ b/scaleway-k8s/tasks/kubeconfig.yml @@ -18,4 +18,8 @@ X-Auth-Token: "{{ scw_secret_key }}" when: item.name == "{{ project_name_tf }}" with_items: "{{ (output.content |from_json).clusters }}" - \ No newline at end of file + +- name: Copy kubeconfig + copy: + src: "{{ project_terraform }}/kubeconfig" + dest: "{{ project_kubeconfig }}" \ No newline at end of file