full install of k3s is working
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1ec1ebb89d
commit
d341a283a0
2 changed files with 13 additions and 7 deletions
|
|
@ -1,4 +1,10 @@
|
|||
---
|
||||
- name: Install Wireguard
|
||||
include_role:
|
||||
name: wireguard
|
||||
# when:
|
||||
# - kubernetes_cni == "wireguard"
|
||||
|
||||
- name: Check if /usr/local/bin/k3s already existe
|
||||
stat:
|
||||
path: /usr/local/bin/k3s
|
||||
|
|
@ -13,7 +19,7 @@
|
|||
owner: root
|
||||
mode: 0755
|
||||
when:
|
||||
- k3s_bin.stat.exists
|
||||
- not k3s_bin.stat.exists
|
||||
- ansible_machine == "x86_64"
|
||||
|
||||
- name: retreive k3s binary for arm64
|
||||
|
|
@ -24,7 +30,7 @@
|
|||
owner: root
|
||||
mode: 0755
|
||||
when:
|
||||
- k3s_bin.stat.exists
|
||||
- not k3s_bin.stat.exists
|
||||
- ansible_machine == "arm64"
|
||||
|
||||
- name: retreive k3s binary for armv6/armv7
|
||||
|
|
@ -35,7 +41,7 @@
|
|||
owner: root
|
||||
mode: 0755
|
||||
when:
|
||||
- k3s_bin.stat.exists
|
||||
- not k3s_bin.stat.exists
|
||||
- (ansible_machine == "armv7l") or (ansible_machine == "armv6l")
|
||||
|
||||
- name: Create tools link
|
||||
|
|
@ -72,14 +78,14 @@
|
|||
thinpool: kubernetes
|
||||
size: "{{ item.size }}"
|
||||
with_items:
|
||||
- { name: var_lib_k3s, vg: vg_sys, size: 10g, mount_point: /var/lib/rancher/k3s}
|
||||
- { name: var_lib_k3s, vg: vg_sys, size: 10g, mount_point: /var/lib/rancher/k3s, mount_opts: "discard"}
|
||||
|
||||
- name: create file system on containerd lv
|
||||
filesystem:
|
||||
fstype: ext4
|
||||
dev: "/dev/{{ item.vg }}/{{ item.name }}"
|
||||
with_items:
|
||||
- { name: var_lib_k3s, vg: vg_sys, size: 10g, mount_point: /var/lib/rancher/k3s}
|
||||
- { name: var_lib_k3s, vg: vg_sys, size: 10g, mount_point: /var/lib/rancher/k3s, mount_opts: "discard"}
|
||||
|
||||
- name: mount logical volumes
|
||||
mount:
|
||||
|
|
@ -89,7 +95,7 @@
|
|||
opts: "{{ item.mount_opts }}"
|
||||
state: mounted
|
||||
with_items:
|
||||
- { name: var_lib_k3s, vg: vg_sys, size: 10g, mount_point: /var/lib/rancher/k3s}
|
||||
- { name: var_lib_k3s, vg: vg_sys, size: 10g, mount_point: /var/lib/rancher/k3s, mount_opts: "discard"}
|
||||
|
||||
- name: Enable k3s on boot
|
||||
service:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{% if kubernetes_master|bool %}
|
||||
{% if not kubernetes_master|bool %}
|
||||
NODE_TOKEN={{ kubernetes_server_token }}
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue