File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change 2
2
- name : Gather server info
3
3
hosts : micado
4
4
gather_facts : True
5
-
5
+ tags :
6
+ - always
6
7
pre_tasks :
7
8
- name : (MiCADO) Check target is a micado-control plane
8
9
k8s :
33
34
register : registries_content
34
35
when : registries_file.stat.exists
35
36
37
+ - name : Write edge registry and script to localhost
38
+ hosts : localhost
39
+ connection : local
40
+ gather_facts : False
41
+ tags :
42
+ - never
43
+ - edge-files
44
+ tasks :
45
+ - name : Write registries.yaml to localhost
46
+ ansible.builtin.copy :
47
+ content : " {{ hostvars['micado']['registries_content']['content'] | b64decode }}"
48
+ dest : " ../../../registries.yaml"
49
+ when : hostvars['micado']['registries_file'].stat.exists
50
+
51
+ - name : Write k3s agent install script
52
+ ansible.builtin.copy :
53
+ content : |
54
+ #!/bin/bash
55
+ curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION={{ packages.k3s_version }} INSTALL_K3S_EXEC="agent" sh -s - \
56
+ --server "https://{{ hostvars['micado']['ansible_host'] }}:6443" \
57
+ --node-name YOUR_UNIQUE_EDGE_HOSTNAME \
58
+ --token "{{ hostvars['micado']['k3s_token']['content'] | b64decode | trim }}" \
59
+ --node-external-ip YOUR_EDGE_PUBLIC_IP
60
+ dest : " ../../../connect_edge.sh"
61
+ mode : ' 0755'
62
+
36
63
- name : Join agents
37
64
hosts : agents
38
65
gather_facts : False
You can’t perform that action at this time.
0 commit comments