Puppet Class: nfs::server

Defined in:
manifests/server.pp

Summary

Class: nfs::server

Overview

This class exists to

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

Parameters:

  • ensure (Enum['present', 'absent', 'running', 'stopped', 'disabled']) (defaults to: $nfs::ensure)
  • nfs_v4 (Boolean) (defaults to: $nfs::nfs_v4)
  • nfs_v4_export_root (String) (defaults to: $nfs::nfs_v4_export_root)
  • nfs_v4_export_root_clients (String) (defaults to: $nfs::nfs_v4_export_root_clients)
  • nfs_v4_idmap_domain (String) (defaults to: $nfs::nfs_v4_idmap_domain)
  • nfs_v4_root_export_ensure (String) (defaults to: $nfs::nfs_v4_root_export_ensure)
  • nfs_v4_root_export_mount (Optional[String]) (defaults to: $nfs::nfs_v4_root_export_mount)
  • nfs_v4_root_export_remounts (Boolean) (defaults to: $nfs::nfs_v4_root_export_remounts)
  • nfs_v4_root_export_atboot (Boolean) (defaults to: $nfs::nfs_v4_root_export_atboot)
  • nfs_v4_root_export_options (String) (defaults to: $nfs::nfs_v4_root_export_options)
  • nfs_v4_root_export_bindmount (Optional[String]) (defaults to: $nfs::nfs_v4_root_export_bindmount)
  • nfs_v4_root_export_tag (Optional[String]) (defaults to: $nfs::nfs_v4_root_export_tag)

Author:



23
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
50
51
52
53
54
55
56
# File 'manifests/server.pp', line 23

class nfs::server (
  Enum['present', 'absent', 'running', 'stopped', 'disabled'] $ensure                       = $nfs::ensure,
  Boolean                                                     $nfs_v4                       = $nfs::nfs_v4,
  String                                                      $nfs_v4_export_root           = $nfs::nfs_v4_export_root,
  String                                                      $nfs_v4_export_root_clients   = $nfs::nfs_v4_export_root_clients,
  String                                                      $nfs_v4_idmap_domain          = $nfs::nfs_v4_idmap_domain,
  String                                                      $nfs_v4_root_export_ensure    = $nfs::nfs_v4_root_export_ensure,
  Optional[String]                                            $nfs_v4_root_export_mount     = $nfs::nfs_v4_root_export_mount,
  Boolean                                                     $nfs_v4_root_export_remounts  = $nfs::nfs_v4_root_export_remounts,
  Boolean                                                     $nfs_v4_root_export_atboot    = $nfs::nfs_v4_root_export_atboot ,
  String                                                      $nfs_v4_root_export_options   = $nfs::nfs_v4_root_export_options,
  Optional[String]                                            $nfs_v4_root_export_bindmount = $nfs::nfs_v4_root_export_bindmount,
  Optional[String]                                            $nfs_v4_root_export_tag       = $nfs::nfs_v4_root_export_tag,
) {
  # package(s)
  class { 'nfs::server::package': }

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

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

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