{"id":15227837,"url":"https://github.com/voxpupuli/puppet-nfs","last_synced_at":"2026-04-01T17:22:02.502Z","repository":{"id":24679991,"uuid":"28090898","full_name":"voxpupuli/puppet-nfs","owner":"voxpupuli","description":"Installs and configures NFS server and clients","archived":false,"fork":false,"pushed_at":"2026-03-27T18:56:49.000Z","size":589,"stargazers_count":17,"open_issues_count":11,"forks_count":82,"subscribers_count":45,"default_branch":"master","last_synced_at":"2026-03-28T09:33:48.581Z","etag":null,"topics":["nfs","nfs-client","nfs-exports","nfs-mount","nfs-server","puppet"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/modules/derdanne/nfs","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2014-12-16T14:36:35.000Z","updated_at":"2026-03-27T18:56:57.000Z","dependencies_parsed_at":"2024-06-24T11:29:09.659Z","dependency_job_id":"4c18c6d3-cdf3-4db7-889d-1a8dfb57830a","html_url":"https://github.com/voxpupuli/puppet-nfs","commit_stats":{"total_commits":369,"total_committers":41,"mean_commits":9.0,"dds":"0.49864498644986455","last_synced_commit":"8f67adc00866250be14cd2d20a68565119aebc91"},"previous_names":["voxpupuli/puppet-nfs","derdanne/puppet-nfs"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/puppet-nfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-nfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-nfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-nfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-nfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-nfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-nfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nfs","nfs-client","nfs-exports","nfs-mount","nfs-server","puppet"],"created_at":"2024-09-28T23:06:20.379Z","updated_at":"2026-04-01T17:22:02.487Z","avatar_url":"https://github.com/voxpupuli.png","language":"Puppet","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# puppet-nfs\n\n[![Build Status](https://github.com/voxpupuli/puppet-nfs/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-nfs/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-nfs/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-nfs/actions/workflows/release.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/nfs.svg)](https://forge.puppetlabs.com/puppet/nfs)\n[![puppetmodule.info docs](https://www.puppetmodule.info/images/badge.svg)](https://www.puppetmodule.info/m/puppet-nfs)\n[![Apache-2.0 License](https://img.shields.io/github/license/voxpupuli/puppet-nfs.svg)](LICENSE)\n[![Donated by Daniel Klockenkaemper](https://img.shields.io/badge/donated%20by-Daniel%20Klockenkaemper-fb7047.svg)](#transfer-notice)\n\n## Table of Contents\n\n1. [Module Description - What the module does and why it is useful](#module-description)\n2. [Setup - The basics of getting started with puppet-nfs](#setup)\n    * [What puppet-nfs affects](#what-puppet-nfs-affects)\n    * [Beginning with puppet-nfs](#beginning-with-puppet-nfs)\n3. [Usage - Configuration options and additional functionality](#usage)\n4. [Limitations - OS compatibility, etc.](#limitations)\n\n## Module Description\n\nThis module installs, configures and manages everything on NFS clients and servers.\n\nThis module is a complete refactor of the module haraldsk/nfs, because Harald Skoglund sadly is not\nmaintaining his module actively anymore. It is stripped down to use only the class 'nfs'\nand parametrized to act as a server, client or both with the parameters 'server_enabled'\nand 'client_enabled'.\n\nIt supports the OS Families Ubuntu, Debian, Redhat, SUSE, Gentoo and Archlinux. It supports also Strict Variables, so if you pass all\nOS specific parameters correctly it should work on your preferred OS too. Feedback, bugreports,\nand feature requests are always welcome, visit \u003chttps://github.com/voxpupuli/puppet-nfs\u003e.\n\nIf you want to contribute, please do a fork on github, create a branch \"feature name\" with your\nfeatures and do a pull request.\n\n## Setup\n\n### What puppet-nfs affects\n\nThis module can be used to configure your nfs client and/or server, it could export\nnfs mount resources via storeconfigs or simply mount nfs shares on a client. You can\nalso easily use the `each` function when you store your exports i.e. via hiera.\n\n### Beginning with puppet-nfs\n\nOn a nfs server the following code is sufficient to get all packages installed and services\nrunning to use nfs:\n\n```puppet\nnode server {\n  class { 'nfs':\n    server_enabled =\u003e true,\n  }\n}\n```\n\nOn a client the following code is sufficient:\n\n```puppet\nnode server {\n  class { 'nfs':\n    client_enabled =\u003e true,\n  }\n}\n```\n\n## Usage\n\n### Simple NFSv3 server and client example\n\nThis will export /data_folder on the server and automagically mount it on client.\n\n```puppet\nnode server {\n  class { 'nfs':\n    server_enabled =\u003e true,\n  }\n  nfs::server::export { '/data_folder':\n    ensure  =\u003e 'mounted',\n    clients =\u003e '10.0.0.0/24(rw,insecure,async,no_root_squash) localhost(rw)'\n  }\n}\n\n# By default, mounts are mounted in the same folder on the clients as\n# they were exported from on the server\nnode client {\n  class { 'nfs':\n    client_enabled =\u003e true,\n  }\n  Nfs::Client::Mount \u003c\u003c| |\u003e\u003e\n}\n```\n\n### Simple NFSv4 client example\n\nThis will mount /data on client in /share/data.\n\n```puppet\nnode client {\n  class { 'nfs':\n    server_enabled =\u003e false,\n    client_enabled =\u003e true,\n    nfs_v4_client  =\u003e true,\n    nfs_v4_idmap_domain =\u003e $facts['networking']['domain'],\n  }\n\n  nfs::client::mount { '/share/data':\n    server =\u003e '192.168.0.1',\n    share  =\u003e 'data',\n  }\n}\n```\n\n### NFSv3 multiple exports, servers and multiple node example\n\n```puppet\nnode server1 {\n  class { 'nfs':\n    server_enabled =\u003e true,\n  }\n  nfs::server::export { '/data_folder':\n    ensure  =\u003e 'mounted',\n    clients =\u003e '10.0.0.0/24(rw,insecure,async,no_root_squash) localhost(rw)',\n  }\n  nfs::server::export { '/homeexport':\n    ensure  =\u003e 'mounted',\n    clients =\u003e '10.0.0.0/24(rw,insecure,async,root_squash)',\n    mount   =\u003e '/srv/home',\n  }\n}\n\nnode server2 {\n  class { 'nfs':\n    server_enabled =\u003e true,\n  }\n  # ensure is passed to mount, which will make the client not mount it\n  # the directory automatically, just add it to fstab\n  # The directory on the NFS server is not created automatically.\n  nfs::server::export { '/media_library':\n    ensure     =\u003e 'present',\n    nfstag     =\u003e 'media',\n    clients    =\u003e '10.0.0.0/24(rw,insecure,async,no_root_squash) localhost(rw)',\n    manage_dir =\u003e false,\n  }\n}\n\nnode client {\n  class { 'nfs':\n    client_enabled =\u003e true,\n  }\n  Nfs::Client::Mount \u003c\u003c| |\u003e\u003e\n}\n\n# Using a storeconfig override, to change ensure option, so we mount\n# all shares\nnode greedy_client {\n  class { 'nfs':\n    client_enabled =\u003e true,\n  }\n  Nfs::Client::Mount \u003c\u003c| |\u003e\u003e {\n    ensure =\u003e 'mounted',\n  }\n}\n\n# only the mount tagged as media\n# also override mount point\nnode media_client {\n  class { 'nfs':\n    client_enabled =\u003e true,\n  }\n  Nfs::Client::Mount \u003c\u003c| nfstag == 'media' |\u003e\u003e {\n    ensure =\u003e 'mounted',\n    mount  =\u003e '/import/media',\n  }\n}\n\n# All @@nfs::server::mount storeconfigs can be filtered by parameters\n# Also all parameters can be overridden (not that it's smart to do\n# so).\n# Check out the doc on exported resources for more info:\n# https://help.puppet.com/core/8/Content/PuppetCore/lang_exported.htm\nnode single_server_client {\n  class { 'nfs':\n    client_enabled =\u003e true,\n  }\n  Nfs::Client::Mount \u003c\u003c| server == 'server1' |\u003e\u003e {\n    ensure =\u003e 'absent',\n  }\n}\n```\n\n### NFSv4 Simple example\n\n```puppet\n# We use the $facts['networking']['domain'] fact for the Domain setting in\n# /etc/idmapd.conf.\n# For NFSv4 to work this has to be equal on servers and clients\n# set it manually if unsure.\n#\n# All nfsv4 exports are bind mounted into /export/$mount_name\n# and mounted on /srv/$mount_name on the client.\n# Both values can be overridden through parameters both globally\n# and on individual nodes.\nnode server {\n  file { ['/data_folder', '/homeexport']:\n    ensure =\u003e 'directory',\n  }\n  class { 'nfs':\n    server_enabled      =\u003e true,\n    nfs_v4              =\u003e true,\n    nfs_v4_idmap_domain =\u003e 'example.com',\n    nfs_v4_export_root  =\u003e '/export',\n    nfs_v4_export_root_clients =\u003e '*(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)',\n  }\n  nfs::server::export { '/data_folder':\n    ensure  =\u003e 'mounted',\n    clients =\u003e '*(rw,insecure,async,no_root_squash,no_subtree_check)',\n  }\n  nfs::server::export { '/homeexport':\n    ensure  =\u003e 'mounted',\n    clients =\u003e '*(rw,insecure,async,root_squash,no_subtree_check)',\n    mount   =\u003e '/srv/home',\n  }\n}\n\n# By default, mounts are mounted in the same folder on the clients as\n# they were exported from on the server\n\nnode client {\n  class { 'nfs':\n    client_enabled =\u003e true,\n    nfs_v4_client  =\u003e true,\n  }\n  Nfs::Client::Mount \u003c\u003c| |\u003e\u003e\n}\n\n# We can also mount the NFSv4 Root directly through nfs::client::mount::nfsv4::root.\n# By default /srv will be used for as mount point, but can be overriden through\n# the 'mounted' option.\n\nnode client2 {\n  $server = 'server'\n  class { 'nfs':\n    client_enabled =\u003e true,\n    nfs_v4_client  =\u003e true,\n  }\n  Nfs::Client::Mount::Nfs_v4::Root \u003c\u003c| server == $server |\u003e\u003e {\n    mount =\u003e \"/srv/${server}\",\n  }\n}\n```\n\n### NFSv4 insanely overcomplicated reference example\n\n```puppet\n# and on individual nodes.\nnode server {\n  class { 'nfs':\n    server_enabled      =\u003e true,\n    nfs_v4              =\u003e true,\n    # Below are defaults\n    nfs_v4_idmap_domain =\u003e $facts['networking']['domain'],\n    nfs_v4_export_root  =\u003e '/export',\n    # Default access settings of /export root\n    nfs_v4_export_root_clients =\u003e \"*.${facts['networking']['domain']}(ro,fsid=root,insecure,no_subtree_check,async,root_squash)\",\n  }\n\n  nfs::server::export { '/data_folder':\n    # These are the defaults\n    ensure      =\u003e 'mounted',\n    # rbind or bind mounting of folders bindmounted into /export\n    # google it\n    bind        =\u003e 'rbind',\n    # everything below here is propagated by to storeconfigs\n    # to clients\n    #\n    # Directory where we want export mounted on client\n    mount       =\u003e undef,\n    remounts    =\u003e false,\n    atboot      =\u003e false,\n    # Don't remove that option, but feel free to add more.\n    options_nfs =\u003e '_netdev',\n    # If set will mount share inside /srv (or overridden mount_root)\n    # and then bindmount to another directory elsewhere in the fs -\n    # for fanatics.\n    bindmount   =\u003e undef,\n    # Used to identify a catalog item for filtering by\n    # storeconfigs, kick ass.\n    nfstag      =\u003e 'kick-ass',\n    # copied directly into /etc/exports as a string, for simplicity\n    clients     =\u003e '10.0.0.0/24(rw,insecure,no_subtree_check,async,no_root_squash)',\n  }\n}\n\nnode client {\n  class { 'nfs':\n    client_enabled      =\u003e true,\n    nfs_v4_client       =\u003e true,\n    nfs_v4_idmap_domain =\u003e $facts['networking']['domain'],\n    nfs_v4_mount_root   =\u003e '/srv',\n  }\n\n  # We can as you by now know, override options set on the server\n  # on the client node.\n  # Be careful. Don't override mount points unless you are sure\n  # that only one export will match your filter!\n\n  Nfs::Client::Mount \u003c\u003c| nfstag == 'kick-ass' |\u003e\u003e {\n    # Directory where we want export mounted on client\n    mount       =\u003e undef,\n    remounts    =\u003e false,\n    atboot      =\u003e false,\n    # Don't remove that option, but feel free to add more.\n    options_nfs =\u003e '_netdev',\n    # If set will mount share inside /srv (or overridden mount_root)\n    # and then bindmount to another directory elsewhere in the fs -\n    # for fanatics.\n    bindmount   =\u003e undef,\n  }\n}\n```\n\n### Simple create nfs export resources with hiera example\n\n**Hiera Server Role:**\n\n```yaml\nclasses:\n  - nfs\n\nnfs::server_enabled: true\nnfs::client_enabled: false\nnfs::nfs_v4: true\nnfs::nfs_v4_idmap_domain: '%{facts.networking.domain}'\nnfs::nfs_v4_export_root: '/share'\nnfs::nfs_v4_export_root_clients: '192.168.0.0/24(rw,fsid=root,insecure,no_subtree_check,async,no_root_squash)'\n\nnfs::nfs_exports_global:\n  /var/www: {}\n  /var/smb: {}\n```\n\n**Hiera Client Role:**\n\n```yaml\nclasses:\n  - nfs\n\nnfs::client_enabled: true\nnfs::nfs_v4_client: true\nnfs::nfs_v4_idmap_domain: %{facts.networking.domain}\nnfs::nfs_v4_mount_root: '/share'\nnfs::nfs_server: 'nfs-server-fqdn'\n```\n\n**Puppet:**\n\n```puppet\nnode server {\n  lookup('classes', Array[String], 'unique', []).include\n  $nfs_exports_global = lookup('nfs::nfs_exports_global', Hash, 'hash', {})\n\n  $defaults_nfs_exports = {\n    ensure  =\u003e 'mounted',\n    clients =\u003e '192.168.0.0/24(rw,insecure,no_subtree_check,async,no_root_squash)',\n    nfstag  =\u003e $facts['networking']['fqdn'],\n  }\n\n  $nfs_exports_global.each |$k, $v| {\n    nfs::server::export { $k:\n      * =\u003e $defaults_nfs_exports + $v,\n    }\n  }\n}\n\nnode client {\n  lookup('classes', Array[String], 'unique', []).include\n  $nfs_server = lookup('nfs::nfs_server', String, 'first', undef)\n\n  if $nfs_server {\n    Nfs::Client::Mount \u003c\u003c| nfstag == $nfs_server |\u003e\u003e\n  }\n}\n```\n\n## Limitations\n\nIf you want to have specific package versions installed you may manage the needed packages outside of this\nmodule (use `manage_packages =\u003e false`). It is only tested to use 'present', 'installed', 'absent',\n'purged', 'held', and 'latest' as argument for the parameters `server_package_ensure` and `client_package_ensure`.\n\n## Disclaimer\n\nThis module based on Harald Skoglund \u003charaldsk@redpill-linpro.com\u003e from\n\u003chttps://github.com/haraldsk/puppet-module-nfs/\u003e but has been fundamentally refactored\n\n## Transfer Notice\n\nThis plugin was originally authored by Daniel Klockenkaemper \u003cdk@marketing-factory.de\u003e.\nThe maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance.\nExisting pull requests and issues were transferred over, please fork and continue to contribute here instead of Camptocamp.\n\nPreviously: \u003chttps://github.com/derdanne/puppet-nfs\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-nfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-nfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-nfs/lists"}