diff --git a/site/profile/manifests/nfs.pp b/site/profile/manifests/nfs.pp index 04d5c3ad3..0389ef197 100644 --- a/site/profile/manifests/nfs.pp +++ b/site/profile/manifests/nfs.pp @@ -13,15 +13,24 @@ $devices = lookup('profile::nfs::server::devices', undef, undef, {}) if $devices =~ Hash[String, Array[String]] { $nfs_export_list = keys($devices) - $options_nfsv4 = 'proto=tcp,nosuid,nolock,noatime,actimeo=3,nfsvers=4.2,seclabel,bg' + $options_nfsv4 = 'proto=tcp,nosuid,nolock,noatime,actimeo=3,nfsvers=4.2,seclabel,x-systemd.automount,x-systemd.mount-timeout=30,_netdev' $nfs_export_list.each | String $name | { nfs::client::mount { "/${name}": + ensure => present, server => $server_ip, share => $name, options_nfsv4 => $options_nfsv4, + notify => Systemd::Daemon_reload['nfs-automount'], } } } + + ensure_resource('systemd::daemon_reload', 'nfs-automount') + exec { 'systemctl restart remote-fs.target': + subscribe => Systemd::Daemon_reload['nfs-automount'], + refreshonly => true, + path => ['/bin', '/usr/bin'], + } } class profile::nfs::server (