moved k3s binary to /opt
parent
8634cb8d54
commit
071a5c6382
|
@ -86,6 +86,12 @@ all:
|
||||||
opts: "subvol=home,noatime"
|
opts: "subvol=home,noatime"
|
||||||
passno: "0"
|
passno: "0"
|
||||||
|
|
||||||
|
- src: "/dev/mapper/disk0"
|
||||||
|
path: "/opt"
|
||||||
|
fstype: "btrfs"
|
||||||
|
opts: "subvol=opt,noatime"
|
||||||
|
passno: "0"
|
||||||
|
|
||||||
- src: "/dev/mapper/disk0"
|
- src: "/dev/mapper/disk0"
|
||||||
path: "/var/lib/builder/src"
|
path: "/var/lib/builder/src"
|
||||||
fstype: "btrfs"
|
fstype: "btrfs"
|
||||||
|
|
|
@ -4,19 +4,25 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
k3s_suffix: "{{ k3s_suffix_lookup[ansible_architecture] }}"
|
k3s_suffix: "{{ k3s_suffix_lookup[ansible_architecture] }}"
|
||||||
|
|
||||||
|
- name: create k3s opt directory
|
||||||
|
file:
|
||||||
|
path: /opt/k3s
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: download k3s binary
|
- name: download k3s binary
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ k3s_download_base_url }}/k3s{{ k3s_suffix }}"
|
url: "{{ k3s_download_base_url }}/k3s{{ k3s_suffix }}"
|
||||||
dest: /usr/local/bin/k3s
|
dest: /opt/k3s/k3s
|
||||||
checksum: "sha256:{{ k3s_download_base_url }}/sha256sum{{ k3s_suffix }}.txt"
|
checksum: "sha256:{{ k3s_download_base_url }}/sha256sum{{ k3s_suffix }}.txt"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: create k3s symlinks
|
- name: create k3s symlinks
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
src: /usr/local/bin/k3s
|
src: /opt/k3s/k3s
|
||||||
dest: "/usr/local/bin/{{ item }}"
|
dest: "/usr/local/bin/{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
|
- k3s
|
||||||
- kubectl
|
- kubectl
|
||||||
- crictl
|
- crictl
|
||||||
- ctr
|
- ctr
|
||||||
|
@ -65,6 +71,5 @@
|
||||||
- /usr/local/bin/kubectl
|
- /usr/local/bin/kubectl
|
||||||
- /usr/local/bin/crictl
|
- /usr/local/bin/crictl
|
||||||
- /usr/local/bin/ctr
|
- /usr/local/bin/ctr
|
||||||
- /etc/rancher/k3s/k3s.env
|
|
||||||
- /etc/init.d/k3s
|
- /etc/init.d/k3s
|
||||||
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
|
when: ansible_distribution == "Alpine" and alpine_mode in ["diskless", "data"]
|
||||||
|
|
Loading…
Reference in New Issue