ensuring an NFS dir mounted via puppet configs

Todd Zullinger tmz at pobox.com
Mon Mar 17 15:52:28 UTC 2008


Matt Domsch wrote:
> app4 needs to have /pub be NFS-mounted, for the mirrormanager crawler
> to work correctly.  I fixed this now and restarted the crawler.
> 
> How can we configure puppet to make sure the right entry in /etc/fstab
> is present, and that /pub is mounted?

Something like this should work:

    mount { "/pub":
        device  => "nfshost:/path/to/pub",
        fstype  => "nfs",
        ensure  => "mounted",
        options => "defaults",
        atboot  => true,
    }

That will add the entry to /etc/fstab is it's missing and mount the
filesystem if it's not mounted.

See http://reductivelabs.com/trac/puppet/wiki/TypeReference#mount for
docs.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Does it follow that I reject all authority? Perish the thought. In the
matter of boots, I defer to the authority of the boot-maker.
    -- Mikhail Bakunin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-infrastructure-list/attachments/20080317/53380219/attachment.sig>


More information about the Fedora-infrastructure-list mailing list