Forge Home

systemd_automount

Puppet module to manage systemd automounts

26,614 downloads

24,757 latest version

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

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.4 (latest)
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Sep 21st 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.2.0 < 6.0.0
  • , , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'mzima-systemd_automount', '0.1.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mzima-systemd_automount
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mzima-systemd_automount --version 0.1.4

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

mzima/systemd_automount — version 0.1.4 Sep 21st 2018

systemd_automount

Manage systemd automounts with Puppet

Table of Contents

  1. Description
  2. Setup - The basics of getting started with systemd_automount
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Description

This Puppet module can be used to manage Systemd automount units.

Supported Puppet versions

  • Puppet >= 4

Tested OS Versions

Currently only these OS variants are tested, altought other OS distributions with systemd should also work.

  • Redhat/CentOS >= 7
  • SLES >= 12
  • openSUSE Leap >= 42

Usage

Example: Using Code

You can use the funtionality of this module in your own .pp files by using the defined resource type systemd_automount::config. The list of associated parameters can be found here: Parameters

The code below will mount the remote NFSv3 share 192.168.100.1:/share at the local directory /mnt.

 systemd_automount::config { '/mnt' :
  source  => '192.168.100.1:/share',
  fstype  => 'nfs',
  options => 'vers=3'
 } 

Example: Using YAML (Hiera)

The main class systemd_automount provides the parameter mounts which only accecpts a hash value. The list of associated parameters can be found here: Parameters

The following example will mount the remote CIFS/SMB share //192.168.100.1/smb at the local directory /mountpoint1 and the NFS4 share 192.168.200.2:/exports/nfs4 at the directory /mountpoint2.

 systemd_automount::mounts:
   '/mountpoint1':
     'source'  : '//192.168.100.1/smb'
     'fstype'  : 'cifs'
     'running' : 'false'
   '/mountpoint2':
     'source'  : '192.168.200.2:/exports/nfs4'

Reference

Public Classes

systemd_automount

Main class

Parameters
  • mounts : This parameter accepts an hash describing one or multiple Systemd automount entries. Have a look at class systemd_automount::config to get informations about the posible parameters.

systemd_automount::config

Realizes the configuration of the systemd automount units

Parameters
  • mountpoint : Directory to use as mountpoint for the source device. Type: string Default: undef Example: '/mnt'
  • source : Source device or network filesystem Type: string Default: undef Example: 'nfsserver:/my/share', 'cifsserver://share'
  • fstype : Filesystem type Type: string Default: nfs4 Example: 'nfs', 'cifs'
  • options : Mount options seperated by "," Type: string Default: empty Example: 'sec=krb5p,intr,noacl'
  • ensure : Set this parameters value to "absent" to remove the automount entry. Type: string Default: present
  • dump : fstab dump entry. See "man fstab". Type: integer Default: 0
  • pass : fstab pass entry. See "man fstab". Type: integer Default: 0
  • atboot : Set this to "false" if you don't want the filesystem to be active after reboot or when "mount -a" is given. Type: boolean Default: true
  • running : Set this to false to disable the systemd mount unit. Type: boolean Default: true

Private Classes

systemd_automount::params

Parameter class. Default parameters are defined here.

Limitations

  • This Module is limited to Puppet Version >= 4
  • This Module only supports systemd automount configurations