Puppet Class: nfs::client

Defined in:
manifests/client.pp

Summary

Overview

Class: nfs::client

This class exists to

1. order the loading of classes
2. including all needed classes for nfs as a client

Parameters:

  • ensure (String) (defaults to: $nfs::ensure)

    The ensure parameter is used to determine if the nfs client should be configured and running or not. Valid values are ‘present’ and ‘absent’. Default is ‘present’.

  • nfs_v4 (Boolean) (defaults to: $nfs::nfs_v4_client)

    The nfs_v4 parameter is used to determine if the nfs client should use nfs version 4. Valid values are ‘true’ and ‘false’. Default is ‘false’.

  • nfs_v4_mount_root (String) (defaults to: $nfs::nfs_v4_mount_root)

    The nfs_v4_mount_root parameter is used to determine the root directory for nfs version 4 mounts. Default is ‘/mnt’.

  • nfs_v4_idmap_domain (String) (defaults to: $nfs::nfs_v4_idmap_domain)

    The nfs_v4_idmap_domain parameter is used to determine the domain for nfs version 4 id mapping. Default is ‘localdomain’.

Author:



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'manifests/client.pp', line 24

class nfs::client (
  String  $ensure              = $nfs::ensure,
  Boolean $nfs_v4              = $nfs::nfs_v4_client,
  String  $nfs_v4_mount_root   = $nfs::nfs_v4_mount_root,
  String  $nfs_v4_idmap_domain = $nfs::nfs_v4_idmap_domain,
) {
  # package(s)
  class { 'nfs::client::package': }

  # configuration
  class { 'nfs::client::config': }

  # service(s)
  class { 'nfs::client::service': }

  if $ensure == 'present' {
    # we need the software before configuring it
    Class['nfs::client::package']
    -> Class['nfs::client::config']
    -> Class['nfs::client::service']
  } else {
    # make sure all services are getting stopped before software removal
    Class['nfs::client::service']
    -> Class['nfs::client::package']
  }
}