Puppet Class: nfs::service::start

Inherits:
nfs::service
Inherited by:
nfs::service::client
Defined in:
manifests/service/start.pp

Summary

Overrides only work with inheritance

Overview

This class exists so I can override parameters set in the nfs::service class. The unit tests for this class take place in the nfs::service tests.

Parameters:

  • client (Any) (defaults to: $nfs::service::client)

    Boolean, should this host be an NFS client

  • server (Any) (defaults to: $nfs::service::server)

    Boolean, should this host be an NFS server



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/service/start.pp', line 15

class nfs::service::start (
  $client = $nfs::service::client,
  $server = $nfs::service::server,
) inherits nfs::service {
  assert_private()

  # start the inheritance chain
  contain '::nfs::service::client'

  # client services
  if $client {
    contain '::nfs::service::client'
  }

  # server services
  if $server {
    contain '::nfs::service::server'
  }
}