From 213887052097b4f4eb3365d2cf50d6d1cffbfafe Mon Sep 17 00:00:00 2001 From: David Kilias Date: Fri, 29 Sep 2023 16:00:57 +0200 Subject: [PATCH] nfs server wird nicht im k3s laufen, labeling entfernt --- host_vars/k3s-w1.n39.eu/vars.yml | 1 - roles/k3s-nfs-host/defaults/main.yml | 4 ---- roles/nfs-host/defaults/main.yml | 4 ++++ roles/{k3s-nfs-host => nfs-host}/tasks/main.yml | 14 -------------- .../templates/exports.j2 | 0 5 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 roles/k3s-nfs-host/defaults/main.yml create mode 100644 roles/nfs-host/defaults/main.yml rename roles/{k3s-nfs-host => nfs-host}/tasks/main.yml (67%) rename roles/{k3s-nfs-host => nfs-host}/templates/exports.j2 (100%) diff --git a/host_vars/k3s-w1.n39.eu/vars.yml b/host_vars/k3s-w1.n39.eu/vars.yml index c70331e..cd6e098 100644 --- a/host_vars/k3s-w1.n39.eu/vars.yml +++ b/host_vars/k3s-w1.n39.eu/vars.yml @@ -1,3 +1,2 @@ --- mac: "12:D8:CD:E4:69:2A" -nfs_host_storage_device: "/dev/sdb" diff --git a/roles/k3s-nfs-host/defaults/main.yml b/roles/k3s-nfs-host/defaults/main.yml deleted file mode 100644 index a5ed9b6..0000000 --- a/roles/k3s-nfs-host/defaults/main.yml +++ /dev/null @@ -1,4 +0,0 @@ -# Defaults for k3s-nfs-host ---- -nfs_host_mount_point: /srv/nfs -nfs_host_kubeconfig_path: "$HOME/.kube/config-k3s-netz39-tunnel" \ No newline at end of file diff --git a/roles/nfs-host/defaults/main.yml b/roles/nfs-host/defaults/main.yml new file mode 100644 index 0000000..634be53 --- /dev/null +++ b/roles/nfs-host/defaults/main.yml @@ -0,0 +1,4 @@ +# Defaults for nfs-host +--- +nfs_host_mount_point: "/srv/nfs" +nfs_host_storage_device: "/dev/sdb" \ No newline at end of file diff --git a/roles/k3s-nfs-host/tasks/main.yml b/roles/nfs-host/tasks/main.yml similarity index 67% rename from roles/k3s-nfs-host/tasks/main.yml rename to roles/nfs-host/tasks/main.yml index d60ff16..9f67277 100644 --- a/roles/k3s-nfs-host/tasks/main.yml +++ b/roles/nfs-host/tasks/main.yml @@ -1,5 +1,4 @@ --- - # - name: Create a new ext4 primary partition # community.general.parted: # device: "{{ nfs_host_storage_device }}" @@ -28,16 +27,3 @@ src: templates/exports.j2 dest: "/etc/exports" # restart nfs server - -# apply node label -- name: Apply labels to storage worker node - kubernetes.core.k8s: - kubeconfig: "{{ nfs_host_kubeconfig_path }}" - state: present - definition: - apiVersion: v1 - kind: Node - metadata: - name: {{ ansible_hostname }} - labels: - node-role.kubernetes.n39.eu/nfs-host: true diff --git a/roles/k3s-nfs-host/templates/exports.j2 b/roles/nfs-host/templates/exports.j2 similarity index 100% rename from roles/k3s-nfs-host/templates/exports.j2 rename to roles/nfs-host/templates/exports.j2