From 4f5f565b7e88fdfcc945c34a5607aa7ae8b41990 Mon Sep 17 00:00:00 2001 From: Peter Pickford Date: Sun, 10 Nov 2019 15:11:26 -0800 Subject: [PATCH] support vers=4.0 for nfs4 must use fstype nfs for vers to work --- manifests/client/mount.pp | 9 ++++++++- metadata.json | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/manifests/client/mount.pp b/manifests/client/mount.pp index e3efced..38a3dc1 100644 --- a/manifests/client/mount.pp +++ b/manifests/client/mount.pp @@ -1,3 +1,5 @@ +# lint:ignore:selector_inside_resource would not add much to readability + define nfs::client::mount ( $server, $share, @@ -32,7 +34,10 @@ mount {"shared ${server}:${share} by ${::clientcert} on ${_nfs4_mount}": ensure => $ensure, device => "${server}:/${share}", - fstype => 'nfs4', + fstype => $options ? { + default => 'nfs4', + /vers=/ => 'nfs', + }, name => $_nfs4_mount, options => $options, remounts => $remounts, @@ -83,4 +88,6 @@ } +# lint:endignore + } diff --git a/metadata.json b/metadata.json index 8c8a153..1d72415 100644 --- a/metadata.json +++ b/metadata.json @@ -57,7 +57,7 @@ } ], "name": "echocat-nfs", - "version": "2.0.0", + "version": "2.0.1", "source": "https://github.com/echocat/puppet-nfs.git", "author": "echocat", "license": "Apache-2.0",