switch k3s-w3 to a vm
This commit is contained in:
parent
8deddf3c0b
commit
a21ab3673e
2
hosts
2
hosts
|
@ -60,7 +60,7 @@ all:
|
|||
platform: raspberrypi
|
||||
k3s-w3:
|
||||
ansible_host: 192.168.20.24
|
||||
platform: lxc
|
||||
platform: vm
|
||||
k3s_extra_args: --node-taint kubernetes.io/arch=amd64:PreferNoSchedule
|
||||
debian:
|
||||
hosts:
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^#?ClientAliveInterval'
|
||||
line: ClientAliveInterval 5m
|
||||
line: '#ClientAliveInterval 5m'
|
||||
notify: Restart sshd
|
||||
|
||||
- name: Configure sshd ClientAliveCountMax
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^#?ClientAliveCountMax'
|
||||
line: ClientAliveCountMax 3
|
||||
line: '#ClientAliveCountMax 3'
|
||||
notify: Restart sshd
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
dest: ~/.kube/config
|
||||
remote_src: yes
|
||||
mode: "u=rw,g=,o="
|
||||
changed_when: no # TODO
|
||||
|
||||
- name: Set kubeconfig server ip
|
||||
command: >-
|
||||
|
@ -57,13 +58,3 @@
|
|||
src: /usr/local/bin/k3s
|
||||
dest: /usr/local/bin/crictl
|
||||
state: link
|
||||
|
||||
# - name: Create longhorn install directory
|
||||
# file:
|
||||
# path: /var/lib/rancher/k3s/server/manifests/longhorn
|
||||
# state: directory
|
||||
|
||||
# - name: Install longhorn
|
||||
# get_url:
|
||||
# url: https://raw.githubusercontent.com/longhorn/longhorn/v1.2.0/deploy/longhorn.yaml
|
||||
# dest: /var/lib/rancher/k3s/server/manifests/longhorn/longhorn.yaml
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# warning: iscsi is incompatible with lxc!
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1226855
|
||||
|
||||
- name: Download amd64 k3s binary
|
||||
get_url:
|
||||
url: https://github.com/k3s-io/k3s/releases/download/{{ k3s.version }}/k3s
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
- name: Download amd64 k3s binary
|
||||
get_url:
|
||||
url: https://github.com/k3s-io/k3s/releases/download/{{ k3s.version }}/k3s
|
||||
checksum: sha256:https://github.com/k3s-io/k3s/releases/download/{{ k3s.version }}/sha256sum-amd64.txt
|
||||
dest: /usr/local/bin/k3s
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
notify: reboot
|
Loading…
Reference in New Issue