added script and readme

This commit is contained in:
2025-06-29 16:46:20 +02:00
parent 60c1665adb
commit 994a857b5d
5 changed files with 93 additions and 1 deletions

View File

@ -2,6 +2,7 @@
hosts: k8s_control_plane
become: true
vars:
## This is the default networkd of Calico
pod_network_cidr: "192.168.0.0/16"
apiserver_advertise_address: "10.50.3.21"
cri_socket: "unix:///run/containerd/containerd.sock"

View File

@ -0,0 +1,36 @@
---
- name: Setup Longhorn Requirements
hosts: all
become: true
tasks:
- name: Install required packages
apt:
name:
- open-iscsi
- nfs-common
state: present
update_cache: yes
- name: Ensure iscsi_tcp kernel module is loaded
modprobe:
name: iscsi_tcp
state: present
- name: Ensure iscsi_tcp module loads on boot
copy:
dest: /etc/modules-load.d/iscsi.conf
content: |
iscsi_tcp
owner: root
group: root
mode: '0644'
- name: Disable and stop multipathd service
systemd:
name: multipathd
enabled: false
state: stopped
masked: true
daemon_reload: yes
ignore_errors: true # in case it's not installed

View File

@ -1,4 +1,5 @@
# master-k8s.yaml
- import_playbook: k8s-install-deps.yaml
- import_playbook: k8s-init.yaml
- import_playbook: install_cni.yaml
- import_playbook: install_cni.yaml
- import_playbook: longhorn-reqs.yaml