Puppet Class: install_server::tftp_server

Defined in:
modules/install_server/manifests/tftp_server.pp

Overview

Parameters:

  • ensure_service (Enum['stopped', 'running']) (defaults to: 'running')


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
# File 'modules/install_server/manifests/tftp_server.pp', line 15

class install_server::tftp_server (
    Enum['stopped', 'running'] $ensure_service = 'running',
){
    file { '/srv/tftpboot':
        # config files in the puppet repository,
        # larger files like binary images in volatile
        source       => [
            'puppet:///modules/install_server/tftpboot',
            # lint:ignore:puppet_url_without_modules
            'puppet:///volatile/tftpboot',
            # lint:endignore
        ],
        sourceselect => all,
        mode         => '0444',
        owner        => 'root',
        group        => 'root',
        recurse      => remote,
        backup       => false,
    }

    file { '/etc/default/atftpd':
        mode   => '0444',
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/install_server/atftpd-default',
        notify => Service['atftpd'],
    }

    package { 'atftpd':
        ensure  => present,
        require => File['/etc/default/atftpd'],
    }

    service { 'atftpd':
        ensure    => $ensure_service,
        hasstatus => false,
        require   => Package['atftpd'],
    }

    base::service_auto_restart { 'atftpd': }
}