From 3403f98b458378cff359452c3a6e3a4136e2582e Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sun, 1 May 2022 09:55:05 +0200 Subject: [PATCH] FEAT: get kubeconfig after k3s installation --- .gitignore | 1 + pb_install.yml | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9a09fd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +kubeconfig_*.yml diff --git a/pb_install.yml b/pb_install.yml index 48772b4..de5ff14 100644 --- a/pb_install.yml +++ b/pb_install.yml @@ -23,6 +23,11 @@ path: ~/.bashrc line: "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" insertafter: EOF + - name: get kubeconfig + fetch: + src: /etc/rancher/k3s/k3s.yaml + dest: kubeconfig_{{ ansible_host }}.yml + flat: yes - hosts: all gather_facts: false