File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
environments/common/inventory/group_vars/all Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 12
12
tags : k3s
13
13
tasks :
14
14
- name : Start k3s agents
15
- vars : # set outside of role to allow compute init to define own value
16
- k3s_bootstrap_token : " {{ hostvars[groups['k3s_server'] | first]._k3s_token_output.stdout | default('') }}"
17
15
ansible.builtin.include_role :
18
16
name : k3s
19
17
tasks_from : agent-runtime.yml
Original file line number Diff line number Diff line change 28
28
shell :
29
29
cmd : " k3s token create --ttl {{ k3s_bootstrap_token_expiry }}"
30
30
register : _k3s_token_output
31
+
32
+ - name : Set bootstrap token as fact
33
+ set_fact :
34
+ k3s_bootstrap_token : " {{ _k3s_token_output.stdout }}"
Original file line number Diff line number Diff line change
1
+ k3s_bootstrap_token : " {{ hostvars[groups['k3s_server'] | first].k3s_bootstrap_token | default('') }}"
You can’t perform that action at this time.
0 commit comments