Forge Home

nfs

NFS Client and Server

18,310 downloads

12,851 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.1 (latest)
  • 0.2.0
  • 0.1.9
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jun 30th 2015
This version is compatible with:
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'jbeard-nfs', '0.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jbeard-nfs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jbeard-nfs --version 0.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

jbeard/nfs — version 0.2.1 Jun 30th 2015

#nfs

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with nfs
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

##Overview This is a module designed for controlling the Network File System server and client daemons.

##Module Description This module installs and configures the Network File System servers and clients.

##Setup

###What nfs affects The nfs module will install the appropriate packages for RedHat and Debian distributions. It also controls execution of the appropriate daemon services.

###Setup requirements This module requires the puppetlabs/stdlib module and the jbeard/portmap modules.

###Beginning with nfs The nfs module is broken into two main components: nfs::client for those hosts that only wish to consume NFS exports from another server, and nfs::server for those hosts that wish also to export filesystems via NFS. Importing the nfs class directly will have no affect. At this time, inclusion of the nfs::server class automatically includes the nfs::client class as well.

Furthermore, for hosts that import the nfs::server class, the nfs::export type becomes available. This type exposes the /etc/exports file with a puppet-like interface.

##Usage

###NFS Client To enable a host to act as an NFS client, simply include the nfs::client class in the manifest.

include nfs::client

The resource may optionally be specified as

class { 'nfs::client':
    ensure => installed,
}

###NFS Server To enable a host to act as an NFS server, include the nfs::server class in the manifest and, optionally, some nfs::export resources.

class { 'nfs::server':
    package => latest,
    service => running,
    enable  => true,
}

nfs::export { '/srv/shared':
    options => [ 'rw', 'async' ],
    clients => [ "${::network_eth0}/${netmask_eth0}" ],
}

You also have the options of manageing only the /etc/exports config file by enabling configonly => true

class { 'nfs::server':
  configonly => true
}

NFS Exports

If you want to use hiera to define all your exports in one place. If you place these elements in one of your yaml files parsed

---
nfs::exports::definitions:
  :export_hiera_1:
    :path:        '/tmp/export_hiera_1'
    :options:     ['rw', 'async' ]
    :clients:     [ 192.168.1.77 ]
  :export_hiera_chroot: 
    :path:        /tmp/export_hiera_chroot
    :options:     ['ro', 'async', 'no_subtree_check', 'no_root_squash' ]
    :clients:     [ 192.168.1.0/24 ]

if will produce the following /etc/exports

# This file is configured through the nfs::server puppet module.
/tmp/export_hiera_1 192.168.1.77(rw,async)

/tmp/export_hiera_chroot 192.168.1.0/24(ro,async,no_subtree_check,no_root_squash)

Or as shown in the file tests/exports.pp you may enter a hash directly into your puppet file

##Reference TODO List all the classes and organization

##Limitations The nfs module is currently only supported on RedHat Enterprise Linux 5/6, CentOS 5/6, Ubuntu 12.04 LTS, and Debian (Client only).

Furthermore, use of the nfs::server class dictates that all exports be defined with the nfs::export resource type.

##Development TODO Document development practices