From 94c1382dca142f97bce061d0fcf9d05b67af1cf4 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 13 Jun 2022 12:16:28 +0200 Subject: [PATCH] NFS: one file for each export. --- tasks/nfs-kernel-server.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tasks/nfs-kernel-server.yml b/tasks/nfs-kernel-server.yml index d92c6cf..e8d8004 100644 --- a/tasks/nfs-kernel-server.yml +++ b/tasks/nfs-kernel-server.yml @@ -45,13 +45,21 @@ - name: Manage the NFS exports block: - - name: Install the NFS export file + - name: Create the NFS exports folder + file: + dest: '/etc/exports.d' + owner: root + group: root + mode: 0755 + + - name: Install the NFS export files template: src: 'kernel-nfs-exports.j2' - dest: '/etc/exports' + dest: '/etc/exports.d/{{ item.name }}' owner: root group: root mode: 0644 + loop: '{{ nfs_server_exports }}' register: update_exportfs - name: Ensure that the Kernel NFS service is started and enabled on EL