Forge Home

autofs

Installs and configures autofs

117,497 downloads

56,773 latest version

4.6 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.

Version information

  • 1.2.5 (latest)
  • 1.2.4
  • 1.2.3
  • 1.2.2
  • 1.2.0
  • 1.1.12
  • 1.1.9
  • 1.1.8
  • 1.1.7
  • 1.1.6
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Dec 21st 2016
This version is compatible with:
  • ArchLinux, , , , , , , , Gentoo

Start using this module

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

Add this module to your Puppetfile:

mod 'yuav-autofs', '1.2.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add yuav-autofs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install yuav-autofs --version 1.2.5

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

yuav/autofs — version 1.2.5 Dec 21st 2016

Build Status Dependency Status

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 autofs
  4. Usage - Configuration options and additional functionality

Overview

Installs and configures autofs which provides automount functionality.

Module Description

Installs and configures autofs which provides automount functionality.

Setup

What autofs affects

  • Package autofs, and corresponding configs will be managed by Puppet - overwriting any local files

Setup Requirements

Requires puppetlabs-stdlib and puppetlabs-concat modules

Beginning with autofs

Basic installation:

class { 'autofs': }

Usage

Example usage for automounting home folders:

class { 'autofs':
  mounts => {
    'home' => {
      remote     => 'nfs.com:/export/home',
      mountpoint => '/home',
      options    => '-hard,rw',
    },
    'net'  => {
      remote     => 'nfs:/folder',
      mountpoint => '/remote/folder',
      options    => '-soft,ro',
    },
    'misc' => {
      remote     => ':/dev/sdb1',
      mountpoint => '/misc/usb',
      options    => '-fstype=auto,rw',
    },
  }
}

Using the autofs::mount directly:

autofs::mount { 'home':
  remote     => 'nfs.com:/export/home',
  mountpoint => '/home',
  options    => '-hard,rw',
}

Supplying a custom automount file:

class { 'autofs':
  'mount_files' => {
    'home' => {
      mountpoint  => '/home',
      file_source => 'puppet:///modules/mymodule/auto.home',
    },
    'net'  => {
      mountpoint  => '/remote',
      file_source => 'puppet:///modules/mymodule/auto.net',
    }
  }
}

Using autofs::mountfile directly

autofs::mountfile { 'homefile':
  mountpoint  => '/home', 
  file_source => 'puppet:///modules/mymodule/auto.home',
}
  

To set e.g. --timeout option in auto.master, you need to manually configure the auto.master entry using the mount_entries param like so:

class { 'autofs':
  mount_entries => {
    '/etc/auto._misc' => { # Resource name match generated name in Mount['misc']
      mountpoint => '/misc',
      mountfile  => '/etc/auto._misc', # Matched to auto generated name in Mount['misc']
      options    => '--timeout=300',
    }
  },
  mounts => {
    'misc'      => {
      remote     => 'nfs:/export/misc/stuff',
      mountpoint => '/misc/stuff',
      options    => '--timeout=300',
    }
  }
}

Using hiera

If you're using hiera:

autofs::mounts:
  'misc':
    remote: 'nfs:/export/misc/stuff'
    mountpoint: '/misc/stuff'
    options: '-hard,rw'
autofs::mount_entries:
    '/etc/auto._misc':
      mountpoint: '/misc'
      mountfile: '/etc/auto._misc'
      options: '--timeout=300'