From 760f2d713762ff760c1225239239677d34eeea29 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Fri, 29 Sep 2023 09:38:36 +0200 Subject: [PATCH] initial plan for storage host role --- roles/k3s-nfs-host/tasks/main.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 roles/k3s-nfs-host/tasks/main.yml diff --git a/roles/k3s-nfs-host/tasks/main.yml b/roles/k3s-nfs-host/tasks/main.yml new file mode 100644 index 0000000..aa7929e --- /dev/null +++ b/roles/k3s-nfs-host/tasks/main.yml @@ -0,0 +1,25 @@ +# nfs server einrichten +# apt install nfs-kernel-server + +# mountpoint anlegen +# /srv/nfs +# sudo chown nobody:nogroup /srv/nfs +# sudo chmod 0777 /srv/nfs + +# modify /etc/exports# +# echo '/srv/nfs 10.0.0.0/24(rw,sync,no_subtree_check)' + +# restart nfs server + +# apply node label +- name: Apply labels to each worker nodes + k8s: + kubeconfig: "{{ ocp_ignition_file_path }}/auth/kubeconfig" + state: present + definition: + apiVersion: v1 + kind: Node + metadata: + name: {{ ansible_hostname }} + labels: + node-role.kubernetes.n39.eu/nfs-host: true \ No newline at end of file