FEAT: get kubeconfig after k3s installation
This commit is contained in:
parent
2827b4eb0a
commit
3403f98b45
2 changed files with 6 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
kubeconfig_*.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
|
||||
|
|
Loading…
Reference in a new issue