Puppet Class: mwv::cachefilesd

Defined in:
puppet/modules/mwv/manifests/cachefilesd.pp

Overview

Class: mwv::cachefilesd

Cachefilesd is a service that can be used to cache NFS files locally inside the VM to improve read performance at the cost of some delay for seeing changes made on the NFS server for recently cached files.

Parameters

enable_cachefilesd

Enable cachefilesd service

Parameters:

  • enable (Any)


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
# File 'puppet/modules/mwv/manifests/cachefilesd.pp', line 12

class mwv::cachefilesd (
    $enable,
) {
    $ensure = $enable ? {
        true => 'present',
        default => 'absent',
    }

    package { 'cachefilesd':
        ensure => $ensure,
    }

    if $enable {
        # Support the `nfs_cache` setting with cachefilesd
        file { '/etc/default/cachefilesd':
            content => "RUN=yes\nSTARTTIME=5\n",
            require => Package['cachefilesd'],
        }

        service { 'cachefilesd':
            ensure    => 'running',
            require   => Package['cachefilesd'],
            subscribe => File['/etc/default/cachefilesd'],
        }
    }
}