Puppet Class: labstore

Defined in:
modules/labstore/manifests/init.pp

Overview

Parameters:

  • nfsd_threads (Any) (defaults to: '192')


8
9
10
11
12
13
14
15
16
17
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'modules/labstore/manifests/init.pp', line 8

class labstore (
    $nfsd_threads = '192',
){

    require_package('nfs-kernel-server')
    require_package('lvm2')

    file { '/etc/idmapd.conf':
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0444',
        source => 'puppet:///modules/labstore/idmapd.conf',
    }

    require_package('nfs-common')
    require_package('nfsd-ldap')

    # Nethogs is useful to monitor NFS client resource utilization
    package { 'nethogs':
        ensure => present,
    }

    file { '/usr/local/sbin/snapshot-manager':
        ensure => present,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
        source => 'puppet:///modules/labstore/snapshot-manager.py',
    }

    if ( $::realm != 'labs' ) {
        file { '/etc/default/nfs-common':
            ensure => present,
            owner  => 'root',
            group  => 'root',
            mode   => '0555',
            source => 'puppet:///modules/labstore/nfs-common',
        }

        service { 'rpcbind':
            ensure => stopped,
        }

        exec { '/bin/systemctl mask rpcbind.service':
            creates => '/etc/systemd/system/rpcbind.service',
        }

        exec { '/bin/systemctl mask rpcbind.socket':
            creates => '/etc/systemd/system/rpcbind.socket',
        }
    }

    file { '/etc/default/nfs-kernel-server':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0555',
        content => template('labstore/nfs-kernel-server.erb'),
    }

    # For some reason, on stretch, this isn't created during install of the nfs
    # server, which causes failures in the nfsdcltrack init
    file { '/var/lib/nfs/nfsdcltrack/':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
    }
}