added script and readme
This commit is contained in:
@ -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"
|
||||
|
36
ansible/longhorn-reqs.yaml
Normal file
36
ansible/longhorn-reqs.yaml
Normal 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
|
@ -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
|
Reference in New Issue
Block a user