Thank you! My situation was a bit more complicated since needed support for two operating systems, the following implementation worked:
common.yaml nfs_mounts: device: 'nfs.server.com:/mount' options: 'nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport' manifests/profiles/nfs_home.pp class site::profiles::nfs_home { $nfs_mounts_hiera = hiera_hash('nfs_mounts') case $::operatingsystem { 'ubuntu': { mount { "/nfs_mount": device => $nfs_mounts_hiera['device'], fstype => "nfs4", ensure => "mounted", options => $nfs_mounts_hiera['options'], atboot => true, } } 'freebsd': { mounttab { "/nfs_mount": device => $nfs_mounts_hiera['device'], fstype => "nfs4", ensure => "present", options => "rw", target => "/etc/fstab", } } } } On Friday, February 24, 2023 at 6:31:03 AM UTC-5 Chris Ritson wrote: > The code I have been given for an NFS mount is like this. Note the module > in use on the first line…. > > > > types::files: > > # derdanne/nfs takes care of mountpoint creation. > > '<mountpoint>’: > > ensure: directory > > mode: '0775' > > > > debconfs: > > 'apparmor/homedirs': > > ensure: present > > type: string > > value: <mount point subdir with homes> > > seen: 'true' > > notify: Exec[dr_apparmor] > > > > nfs::client_enabled: true > > nfs::manage_packages: true > > nfs::nfs_v4_client: false > > > > nfs_client_mounts: > > <mount point>: > > server: <server name> > > share: <server share> > > > > -- > > Chris Ritson (School of Computing) > > Newcastle University, NE1 7RU > > Tel: +44(0)1912080073 <+44%20191%20208%200073> > > > > *From:* puppet...@googlegroups.com <puppet...@googlegroups.com> > *Sent:* 24 February 2023 11:13 > *To:* Digest recipients <puppet...@googlegroups.com> > *Subject:* [Puppet Users] Digest for puppet...@googlegroups.com - 1 > update in 1 topic > > > > ⚠ External sender. Take care when opening links or attachments. Do not > provide your login details. > > puppet...@googlegroups.com > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%3Futm_source%3Ddigest%26utm_medium%3Demail%23!forum%2Fpuppet-users%2Ftopics&data=05%7C01%7Cchris.ritson%40newcastle.ac.uk%7C792abff5d80b4ab0e2d008db165806cb%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C638128341016272032%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9R0rbbYlDg0EbAkCr%2BJ7u8KNHzaNjhBYm%2FEt1TxjqSU%3D&reserved=0> > > > Google Groups > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%3Futm_source%3Ddigest%26utm_medium%3Demail%2F%23!overview&data=05%7C01%7Cchris.ritson%40newcastle.ac.uk%7C792abff5d80b4ab0e2d008db165806cb%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C638128341016428305%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jQo6gLwy104tZ4ZQ5f3RbnLu%2FBKlh4gRKPLBn2WXPoU%3D&reserved=0> > > > [image: Image removed by sender.] > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%3Futm_source%3Ddigest%26utm_medium%3Demail%2F%23!overview&data=05%7C01%7Cchris.ritson%40newcastle.ac.uk%7C792abff5d80b4ab0e2d008db165806cb%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C638128341016428305%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jQo6gLwy104tZ4ZQ5f3RbnLu%2FBKlh4gRKPLBn2WXPoU%3D&reserved=0> > > Topic digest > View all topics > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%3Futm_source%3Ddigest%26utm_medium%3Demail%23!forum%2Fpuppet-users%2Ftopics&data=05%7C01%7Cchris.ritson%40newcastle.ac.uk%7C792abff5d80b4ab0e2d008db165806cb%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C638128341016428305%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KdyPZjMdxpttqHKI6o9qT74ZprPdYse%2Bdkn%2FX93RDbw%3D&reserved=0> > > > · Mount NFS share defined in hiera > <#m_6369492644251464280_group_thread_0> - 1 Update > > Mount NFS share defined in hiera > <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgroups.google.com%2Fgroup%2Fpuppet-users%2Ft%2F6110781cf613c832%3Futm_source%3Ddigest%26utm_medium%3Demail&data=05%7C01%7Cchris.ritson%40newcastle.ac.uk%7C792abff5d80b4ab0e2d008db165806cb%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C638128341016428305%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MdzQD9u1eWR5DCyufdo%2BcUwJ17xQomJSxzqjc9OLqgM%3D&reserved=0> > > Laci D <lac...@gmail.com>: Feb 23 11:45AM -0800 > > > I'm looking for manifest, hiera example which can mount an NFS defined in > a hiera_hash. > > Someone must have one, thank you! > > Back to top <#m_6369492644251464280_digest_top> > > You received this digest because you're subscribed to updates for this > group. You can change your settings on the group membership page > <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fforum%2F%3Futm_source%3Ddigest%26utm_medium%3Demail%23!forum%2Fpuppet-users%2Fjoin&data=05%7C01%7Cchris.ritson%40newcastle.ac.uk%7C792abff5d80b4ab0e2d008db165806cb%7C9c5012c9b61644c2a91766814fbe3e87%7C1%7C0%7C638128341016428305%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IjoeHMyAQwsqwtLRgNol%2Frn3iW5aj16AdEy4Y8OzbXY%3D&reserved=0> > . > To unsubscribe from this group and stop receiving emails from it send an > email to puppet-users...@googlegroups.com. > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9f05d141-c39a-4b01-97ec-c0fd3cc82fbdn%40googlegroups.com.