Puppet Class: cloudnfs

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

Overview

Parameters:

  • nfsd_threads (Integer) (defaults to: 192)


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
# File 'modules/cloudnfs/manifests/init.pp', line 9

class cloudnfs (
    Integer $nfsd_threads = 192,
){

    ensure_packages(['nfs-kernel-server', 'nfs-common', 'lvm2'])

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

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

    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('cloudnfs/nfs-kernel-server.erb'),
    }

    # For some reason 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',
        require => Package['nfs-kernel-server'],
    }
}