From 64b03ad058e5bde82ab575e87f19e658f712fae3 Mon Sep 17 00:00:00 2001 From: entlein <einentlein@gmail.com> Date: Thu, 14 Jul 2022 13:32:45 +0200 Subject: [PATCH] now that it finally works, we also do the external kubeconfig, but produce a second file and upload that to the KV --- roles/rke2/tasks/kubeconfig.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/roles/rke2/tasks/kubeconfig.yml b/roles/rke2/tasks/kubeconfig.yml index 474e339..b88d655 100644 --- a/roles/rke2/tasks/kubeconfig.yml +++ b/roles/rke2/tasks/kubeconfig.yml @@ -26,18 +26,18 @@ path: kubeconfig.yaml regexp: '^(\s+server: ).*' replace: '\1https://{{ lb_ip_mgmt }}:6443' - -#- name: fetch kubeconfig from master and copy it -# ansible.builtin.fetch: -# src: /etc/rancher/rke2/rke2.yaml -# dest: kubeconfigext.yaml -# flat: yes + +- name: fetch kubeconfig from master and copy it + ansible.builtin.fetch: + src: /etc/rancher/rke2/rke2.yaml + dest: kubeconfigext.yaml + flat: yes -#- name: replace endpoint in external kubeconfig -# delegate_to: localhost -# become: false -# ansible.builtin.replace: -# path: kubeconfigext.yaml -# regexp: '^(\s+server: ).*' -# replace: '\1https://rancher.{{ domain }}:6443' +- name: replace endpoint in external kubeconfig + delegate_to: localhost + become: false + ansible.builtin.replace: + path: kubeconfigext.yaml + regexp: '^(\s+server: ).*' + replace: '\1https://rancher.{{ domain }}:6443' \ No newline at end of file -- GitLab