1
2
3
4
5
6
7
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# puppet tftp module
## Overview
Install tftp-hpa package and configuration files
## Usage
### class tftp
Parameters:
* username: tftp daemon user, default tftp(debian) or nobody(redhat).
* directory: service directory, deafult see params class.
* address: bind address, default 0.0.0.0.
* port: bind port, default 69.
* options: service option, default --secure.
* inetd: run service via xinetd - default false.
Example:
class tftp {
directory => '/opt/tftp',
address => $::ipaddress,
options => '--ipv6 --timeout 60',
}
### tftp::file
Parameters:
* ensure: file type, default file.
* owner: file owner, default tftp.
* group: file group. default tftp.
* mode: file mode, default 0644 (puppet will change to 0755 for directories).
* content: file content.
* source: file source, defaults to puppet:///module/${caller_module_name}/${name} for files without content.
* recurse: directory recurse, default false.
* purge: directory recurse and purge.
* replace: replace directory with file or symlink, default undef,
* recurselimit: directory recurse limit, default undef,
Example:
tftp::file { 'pxelinux.0':
source => 'puppet:///modules/acme/pxelinux.0',
}
tftp::file { 'pxelinux.cfg':
ensure => directory,
}
tftp::file { 'pxelinux.cfg/default':
ensure => file,
source => 'puppet:///modules/acme/pxelinux.cfg/default',
}
The last example can be abbreviated to the following if it's in the acme module:
tftp::file { 'pxelinux.cfg/default': }
## Example
1. tftp directories not in the OS package defaults should be managed as file resources.
2. customization for the class tftp must be declared before using tftp::file resources.
Example:
file { '/opt/tftp':
ensure => directory,
}
class { 'tftp':
directory => '/opt/tftp',
address => $::ipaddress,
}
tftp::file { 'pxelinux.0':
source => 'puppet:///modules/acme/pxelinux.0',
}
The examples use a module acme and the tftp files should be placed in calling module path i.e. (/etc/puppet/modules/acme/files).
## Supported Platforms
The module have been tested on the following operating systems. Testing and patches for other platforms are welcomed.
* Debian Wheezy
* Ubuntu Oneiric
* CentOS
|