FEAT: get kubeconfig after k3s installation

This commit is contained in:
Sebastian Mark 2022-05-01 09:55:05 +02:00
parent 2827b4eb0a
commit 3403f98b45
2 changed files with 6 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
kubeconfig_*.yml

View file

@ -23,6 +23,11 @@
path: ~/.bashrc path: ~/.bashrc
line: "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" line: "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml"
insertafter: EOF insertafter: EOF
- name: get kubeconfig
fetch:
src: /etc/rancher/k3s/k3s.yaml
dest: kubeconfig_{{ ansible_host }}.yml
flat: yes
- hosts: all - hosts: all
gather_facts: false gather_facts: false