Puppet Class: nfs

Inherits:
nfs::params
Defined in:
manifests/init.pp

Overview

Parameters:

  • ensure (Enum['present', 'absent', 'running', 'stopped', 'disabled']) (defaults to: 'present')
  • server_enabled (Boolean) (defaults to: false)
  • client_enabled (Boolean) (defaults to: false)
  • storeconfigs_enabled (Boolean) (defaults to: true)
  • nfs_v4 (Boolean) (defaults to: $::nfs::params::nfs_v4)
  • nfs_v4_client (Boolean) (defaults to: $::nfs::params::nfs_v4)
  • exports_file (Stdlib::Absolutepath) (defaults to: $::nfs::params::exports_file)
  • idmapd_file (Stdlib::Absolutepath) (defaults to: $::nfs::params::idmapd_file)
  • defaults_file (Optional[Stdlib::Absolutepath]) (defaults to: $::nfs::params::defaults_file)
  • manage_packages (Boolean) (defaults to: true)
  • server_packages (Array) (defaults to: $::nfs::params::server_packages)
  • server_package_ensure (String) (defaults to: 'installed')
  • client_packages (Array) (defaults to: $::nfs::params::client_packages)
  • client_package_ensure (String) (defaults to: 'installed')
  • manage_server_service (Boolean) (defaults to: true)
  • manage_server_servicehelper (Boolean) (defaults to: true)
  • manage_client_service (Boolean) (defaults to: true)
  • server_service_name (String) (defaults to: $::nfs::params::server_service_name)
  • server_service_ensure (Enum['present', 'absent', 'running', 'stopped', 'disabled']) (defaults to: 'running')
  • server_service_enable (Boolean) (defaults to: true)
  • server_service_hasrestart (Boolean) (defaults to: $::nfs::params::server_service_hasrestart)
  • server_service_hasstatus (Boolean) (defaults to: $::nfs::params::server_service_hasstatus)
  • server_service_restart_cmd (Optional[String]) (defaults to: $::nfs::params::server_service_restart_cmd)
  • server_nfsv4_servicehelper (Optional[Array]) (defaults to: $::nfs::params::server_nfsv4_servicehelper)
  • client_services (Any) (defaults to: $::nfs::params::client_services)
  • client_nfsv4_services (Any) (defaults to: $::nfs::params::client_nfsv4_services)
  • client_services_enable (Boolean) (defaults to: $::nfs::params::client_services_enable)
  • client_services_hasrestart (Boolean) (defaults to: $::nfs::params::client_services_hasrestart)
  • client_services_hasstatus (Boolean) (defaults to: $::nfs::params::client_services_hasstatus)
  • client_idmapd_setting (Array[String]) (defaults to: $::nfs::params::client_idmapd_setting)
  • client_nfs_fstype (String) (defaults to: $::nfs::params::client_nfs_fstype)
  • client_nfs_options (String) (defaults to: $::nfs::params::client_nfs_options)
  • client_nfsv4_fstype (String) (defaults to: $::nfs::params::client_nfsv4_fstype)
  • client_nfsv4_options (String) (defaults to: $::nfs::params::client_nfsv4_options)
  • client_need_gssd (Boolean) (defaults to: false)
  • client_gssd_service (Boolean) (defaults to: false)
  • client_gssd_service_name (Any) (defaults to: $::nfs::params::client_gssd_service_name)
  • client_gssd_options (String) (defaults to: $::nfs::params::client_gssd_options)
  • client_gssdopt_name (String) (defaults to: $::nfs::params::client_gssdopt_name)
  • client_d9_gssdopt_workaround (Boolean) (defaults to: false)
  • nfs_v4_export_root (String) (defaults to: $::nfs::params::nfs_v4_export_root)
  • nfs_v4_export_root_clients (String) (defaults to: $::nfs::params::nfs_v4_export_root_clients)
  • nfs_v4_mount_root (String) (defaults to: $::nfs::params::nfs_v4_mount_root)
  • nfs_v4_idmap_domain (String) (defaults to: $::nfs::params::nfs_v4_idmap_domain)
  • nfs_v4_idmap_localrealms (Variant[String, Array]) (defaults to: '')
  • nfs_v4_idmap_cache (Integer) (defaults to: 0)
  • manage_nfs_v4_idmap_nobody_mapping (Boolean) (defaults to: false)
  • nfs_v4_idmap_nobody_user (String) (defaults to: $::nfs::params::nfs_v4_idmap_nobody_user)
  • nfs_v4_idmap_nobody_group (String) (defaults to: $::nfs::params::nfs_v4_idmap_nobody_group)
  • nfs_v4_root_export_ensure (String) (defaults to: 'mounted')
  • nfs_v4_root_export_mount (Optional[String]) (defaults to: undef)
  • nfs_v4_root_export_remounts (Boolean) (defaults to: false)
  • nfs_v4_root_export_atboot (Boolean) (defaults to: false)
  • nfs_v4_root_export_options (String) (defaults to: '_netdev')
  • nfs_v4_root_export_bindmount (Optional[String]) (defaults to: undef)
  • nfs_v4_root_export_tag (Optional[String]) (defaults to: undef)
  • nfsv4_bindmount_enable (Boolean) (defaults to: true)
  • client_rpcbind_config (Optional[Stdlib::Absolutepath]) (defaults to: $::nfs::params::client_rpcbind_config)
  • client_rpcbind_optname (Optional[String]) (defaults to: $::nfs::params::client_rpcbind_optname)
  • client_rpcbind_opts (Optional[String]) (defaults to: undef)


212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'manifests/init.pp', line 212

class nfs(
  Enum['present', 'absent', 'running', 'stopped', 'disabled'] $ensure                 = 'present',
  Boolean $server_enabled                                                             = false,
  Boolean $client_enabled                                                             = false,
  Boolean $storeconfigs_enabled                                                       = true,
  Boolean $nfs_v4                                                                     = $::nfs::params::nfs_v4,
  Boolean $nfs_v4_client                                                              = $::nfs::params::nfs_v4,
  Stdlib::Absolutepath $exports_file                                                  = $::nfs::params::exports_file,
  Stdlib::Absolutepath $idmapd_file                                                   = $::nfs::params::idmapd_file,
  Optional[Stdlib::Absolutepath] $defaults_file                                       = $::nfs::params::defaults_file,
  Boolean $manage_packages                                                            = true,
  Array $server_packages                                                              = $::nfs::params::server_packages,
  String $server_package_ensure                                                       = 'installed',
  Array $client_packages                                                              = $::nfs::params::client_packages,
  String $client_package_ensure                                                       = 'installed',
  Boolean $manage_server_service                                                      = true,
  Boolean $manage_server_servicehelper                                                = true,
  Boolean $manage_client_service                                                      = true,
  String $server_service_name                                                         = $::nfs::params::server_service_name,
  Enum['present', 'absent', 'running', 'stopped', 'disabled'] $server_service_ensure  = 'running',
  Boolean $server_service_enable                                                      = true,
  Boolean $server_service_hasrestart                                                  = $::nfs::params::server_service_hasrestart,
  Boolean $server_service_hasstatus                                                   = $::nfs::params::server_service_hasstatus,
  Optional[String] $server_service_restart_cmd                                        = $::nfs::params::server_service_restart_cmd,
  Optional[Array] $server_nfsv4_servicehelper                                         = $::nfs::params::server_nfsv4_servicehelper,
  $client_services                                                                    = $::nfs::params::client_services,
  $client_nfsv4_services                                                              = $::nfs::params::client_nfsv4_services,
  Boolean $client_services_enable                                                     = $::nfs::params::client_services_enable,
  Boolean $client_services_hasrestart                                                 = $::nfs::params::client_services_hasrestart,
  Boolean $client_services_hasstatus                                                  = $::nfs::params::client_services_hasstatus,
  Array[String] $client_idmapd_setting                                                = $::nfs::params::client_idmapd_setting,
  String $client_nfs_fstype                                                           = $::nfs::params::client_nfs_fstype,
  String $client_nfs_options                                                          = $::nfs::params::client_nfs_options,
  String $client_nfsv4_fstype                                                         = $::nfs::params::client_nfsv4_fstype,
  String $client_nfsv4_options                                                        = $::nfs::params::client_nfsv4_options,
  Boolean $client_need_gssd                                                           = false,
  Boolean $client_gssd_service                                                        = false,
  $client_gssd_service_name                                                           = $::nfs::params::client_gssd_service_name,
  String $client_gssd_options                                                         = $::nfs::params::client_gssd_options,
  String $client_gssdopt_name                                                         = $::nfs::params::client_gssdopt_name,
  Boolean $client_d9_gssdopt_workaround                                               = false,
  String $nfs_v4_export_root                                                          = $::nfs::params::nfs_v4_export_root,
  String $nfs_v4_export_root_clients                                                  = $::nfs::params::nfs_v4_export_root_clients,
  String $nfs_v4_mount_root                                                           = $::nfs::params::nfs_v4_mount_root,
  String $nfs_v4_idmap_domain                                                         = $::nfs::params::nfs_v4_idmap_domain,
  Variant[String, Array] $nfs_v4_idmap_localrealms                                    = '',
  Integer $nfs_v4_idmap_cache                                                         = 0,
  Boolean $manage_nfs_v4_idmap_nobody_mapping                                         = false,
  String $nfs_v4_idmap_nobody_user                                                    = $::nfs::params::nfs_v4_idmap_nobody_user,
  String $nfs_v4_idmap_nobody_group                                                   = $::nfs::params::nfs_v4_idmap_nobody_group,
  String $nfs_v4_root_export_ensure                                                   = 'mounted',
  Optional[String] $nfs_v4_root_export_mount                                          = undef,
  Boolean $nfs_v4_root_export_remounts                                                = false,
  Boolean $nfs_v4_root_export_atboot                                                  = false,
  String $nfs_v4_root_export_options                                                  = '_netdev',
  Optional[String] $nfs_v4_root_export_bindmount                                      = undef,
  Optional[String] $nfs_v4_root_export_tag                                            = undef,
  Boolean $nfsv4_bindmount_enable                                                     = true,
  Optional[Stdlib::Absolutepath] $client_rpcbind_config                               = $::nfs::params::client_rpcbind_config,
  Optional[String] $client_rpcbind_optname                                            = $::nfs::params::client_rpcbind_optname,
  Optional[String] $client_rpcbind_opts                                               = undef,
) inherits nfs::params {

  if $server_enabled {

    if $server_nfsv4_servicehelper != undef {
      $effective_nfsv4_client_services = delete($client_nfsv4_services, $server_nfsv4_servicehelper)
    } else {
      $effective_nfsv4_client_services = $client_nfsv4_services
    }

    $effective_client_services = $client_services
    $effective_client_packages = difference($client_packages, $server_packages)

  } else {
    if $client_gssd_service and $client_gssd_service_name != undef {
      $effective_nfsv4_client_services = $client_nfsv4_services + $client_gssd_service_name
    } else {
      $effective_nfsv4_client_services = $client_nfsv4_services
    }

    $effective_client_services = $client_services
    $effective_client_packages = $client_packages

  }

  if $server_enabled {
    class { 'nfs::server': }
  }

  if $client_enabled {
    class { 'nfs::client': }
  }
}