Managing NFS servers and file shares

"There are three kinds of death in this world. There's heart death, there's brain death, and there's being off the network."—Guy Almes

NFS (the Network File System) is a way of mounting a shared directory from a remote server. For example, a pool of web servers might all mount the same NFS share to serve static assets such as images and stylesheets. Although NFS is old technology, it's still widely used, so here's a recipe that will show you how to create an NFS server and share files from it.

How to do it…

  1. Create an nfs module:
    # mkdir /etc/puppet/modules/nfs
    # mkdir /etc/puppet/modules/nfs/manifests
    
  2. Create the file /etc/puppet/modules/nfs/manifests/init.pp with the following contents:
    class nfs { package { "nfs-kernel-server": ...

Get Puppet 2.7 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.