<commit_before>[![Build Status](https://travis-ci.org/Yuav/puppet-autofs.svg?branch=master)](https://travis-ci.org/Yuav/puppet-autofs)
[![Dependency Status](https://gemnasium.com/Yuav/puppet-autofs.png)](http://gemnasium.com/Yuav/puppet-autofs)

#### Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with autofs](#setup)
    * [What autofs affects](#what-autofs-affects)
    * [Setup requirements](#setup-requirements)
    * [Beginning with autofs](#beginning-with-autofs)
4. [Usage - Configuration options and additional functionality](#usage)
    * [Using hiera](#using-hiera)

## 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('nfs.com:/export/home','/home','-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('/home', '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:<commit_msg>Fix curly bracket identation (remove tab)<commit_after>[![Build Status](https://travis-ci.org/Yuav/puppet-autofs.svg?branch=master)](https://travis-ci.org/Yuav/puppet-autofs)
[![Dependency Status](https://gemnasium.com/Yuav/puppet-autofs.png)](http://gemnasium.com/Yuav/puppet-autofs)

#### Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with autofs](#setup)
    * [What autofs affects](#what-autofs-affects)
    * [Setup requirements](#setup-requirements)
    * [Beginning with autofs](#beginning-with-autofs)
4. [Usage - Configuration options and additional functionality](#usage)
    * [Using hiera](#using-hiera)

## 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('nfs.com:/export/home','/home','-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('/home', '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:
{'fraction_non_alphanumeric': 0.1471004243281471, 'fraction_numerical': 0.0034574886060034574, 'mean_word_length': 2.3941333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 63, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2796244', 'n_tokens_mistral': 2040, 'n_tokens_neox': 1919, 'n_words': 454}