Retrieve kubeconfig
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
74c2df1e66
commit
4fdf4b22e5
13
playbook.yml
13
playbook.yml
@ -115,9 +115,17 @@
|
||||
src: /var/lib/rancher/k3s/server/token
|
||||
register: k3s_token
|
||||
|
||||
- name: Initial node -- Retrieve kubeconfig
|
||||
ansible.builtin.shell:
|
||||
cmd: kubectl config view --raw
|
||||
register: k3s_kubeconfig
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: k3s_kubeconfig.stdout
|
||||
|
||||
- name: Initial node -- Store token
|
||||
ansible.builtin.set_fact:
|
||||
cluster: "{{ cluster | combine( { 'token': ( k3s_token.content | b64decode | trim ) } ) }}"
|
||||
cluster: "{{ cluster | combine( { 'token': ( k3s_token.content | b64decode | trim ) }, { 'config': ( k3s_kubeconfig.stdout ) } ) }}"
|
||||
|
||||
- block:
|
||||
|
||||
@ -155,6 +163,9 @@
|
||||
retries: 3
|
||||
delay: 30
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: cluster
|
||||
|
||||
- block:
|
||||
|
||||
- name: Additional nodes -- Install K3s binary
|
||||
|
Loading…
Reference in New Issue
Block a user