File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 18
18
path : " /etc/systemd/system/{{ service_name }}.service.env"
19
19
line : " K3S_URL=https://{{ k3s_server_name }}:6443"
20
20
when : k3s_node_type == "agent"
21
-
21
+
22
22
- name : Start k3s service
23
23
ansible.builtin.systemd :
24
24
name : " {{ service_name }}"
Original file line number Diff line number Diff line change 37
37
with_items :
38
38
- k3s
39
39
- kubectl
40
+
41
+ - name : k9s install
42
+ ansible.builtin.include_role :
43
+ name : k9s
44
+
40
45
41
46
- name : Create ansible-init playbook install directory # TODO: move into ansible-init
42
47
file :
Original file line number Diff line number Diff line change
1
+ ---
2
+ - name : Create install directory
3
+ ansible.builtin.file :
4
+ path : /root/k9s-temp
5
+ state : directory
6
+
7
+ - name : Download k9s
8
+ ansible.builtin.get_url :
9
+ url : https://github.com/derailed/k9s/releases/download/v0.32.5/k9s_Linux_amd64.tar.gz
10
+ dest : /root/k9s-temp/k9s_Linux_amd64.tar.gz
11
+
12
+ - name : Unpack k9s binary
13
+ ansible.builtin.unarchive :
14
+ src : /root/k9s-temp/k9s_Linux_amd64.tar.gz
15
+ dest : /root/k9s-temp
16
+ remote_src : yes
17
+
18
+ - name : Add k9s to root path
19
+ ansible.builtin.copy :
20
+ src : /root/k9s-temp/k9s
21
+ dest : /root/bin/k9s
22
+ mode : u+rwx
23
+ remote_src : yes
24
+
25
+ - name : Add k3s kubeconfig as environment variable
26
+ ansible.builtin.lineinfile :
27
+ path : /etc/environment
28
+ line : " KUBECONFIG=/etc/rancher/k3s/k3s.yaml"
29
+
30
+ - name : Cleanup k9s install directory
31
+ ansible.builtin.file :
32
+ path : /root/k9s-temp
33
+ state : absent
You can’t perform that action at this time.
0 commit comments