18
19
20
21
22
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
|
# File 'manifests/client.pp', line 18
class nfs::client (
$ensure = $::nfs::ensure,
$nfs_v4 = $::nfs::nfs_v4_client,
$nfs_v4_mount_root = $::nfs::nfs_v4_mount_root,
$nfs_v4_idmap_domain = $::nfs::nfs_v4_idmap_domain,
) {
anchor {'nfs::client::begin': }
anchor {'nfs::client::end': }
# 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
Anchor['nfs::client::begin']
-> Class['nfs::client::package']
-> Class['nfs::client::config']
# we need the software and a working configuration before running a service
Class['nfs::client::package'] -> Class['nfs::client::service']
Class['nfs::client::config'] -> Class['nfs::client::service']
Class['nfs::client::service'] -> Anchor['nfs::client::end']
} else {
# make sure all services are getting stopped before software removal
Anchor['nfs::client::begin']
-> Class['nfs::client::service']
-> Class['nfs::client::package']
-> Anchor['nfs::client::end']
}
}
|