diff --git a/inventory.yml b/inventory.yml index 8ff62db..b1513b4 100644 --- a/inventory.yml +++ b/inventory.yml @@ -10,7 +10,6 @@ all: platon.n39.eu: plumbum.n39.eu: pottwal.n39.eu: - plumbum.n39.eu: radon.n39.eu: unicorn.n39.eu: k3s-c1.n39.eu: @@ -35,7 +34,6 @@ all: oganesson.n39.eu: plumbum.n39.eu: pottwal.n39.eu: - plumbum.n39.eu: radon.n39.eu: unicorn.n39.eu: k3s-c1.n39.eu: @@ -54,7 +52,6 @@ all: platon.n39.eu: plumbum.n39.eu: pottwal.n39.eu: - plumbum.n39.eu: radon.n39.eu: wittgenstein.n39.eu: unicorn.n39.eu: diff --git a/roles/nfs-host/tasks/main.yml b/roles/nfs-host/tasks/main.yml index d78ebe7..c1ac52d 100644 --- a/roles/nfs-host/tasks/main.yml +++ b/roles/nfs-host/tasks/main.yml @@ -1,17 +1,18 @@ --- -# - name: Create a new ext4 primary partition -# community.general.parted: -# device: "{{ nfs_host_storage_device }}" -# number: 1 -# state: present -# fs_type: ext4 - -- name: Install nfs-kernel-server +- name: Install required packages ansible.builtin.apt: state: present name: - nfs-kernel-server - nfs-common + - parted + +- name: Create a new ext4 primary partition + community.general.parted: + device: "{{ nfs_host_storage_device }}" + number: 1 + state: present + fs_type: ext4 - name: ensure nfs mountpoints exist ansible.builtin.file: @@ -22,6 +23,13 @@ mode: '0777' with_items: "{{ nfs_host_exports }}" +- name: Mount up device by label + ansible.posix.mount: + path: "{{ nfs_host_exports[0].directory }}" + src: /dev/sdb1 + fstype: ext4 + state: present + - name: template /etc/exports ansible.builtin.template: src: templates/exports.j2