Giter VIP home page Giter VIP logo

puppet-autofs's Introduction

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('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:
    '/etc/auto._misc':
      mountpoint: '/misc'
      mountfile: '/etc/auto._misc'
      options: '--timeout=300'

puppet-autofs's People

Contributors

felipe1982 avatar jskarpe avatar kallies avatar pschichtel avatar tor-wulf avatar yuav avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.