Version information
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-tftp', '0.2.2'
Learn more about managing modules with a PuppetfileDocumentation
puppet tftp module
Overview
Install tftp-hpa package and configuration files
This module will install TFTP as a xinetd service by default. It can be overridden to run as a standalone daemon by setting the inetd parameter to false.
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 true.
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
- tftp directories not in the OS package defaults should be managed as file resources.
- 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
0.2.2 2014-08-20
- Add package require for the tftp xinetd::service
0.2.1 2012-08-21 Puppet Labs info@puppetlabs.com
- Fix permission issues related to xinetd
0.2.0 2012-07-27 Puppet Labs info@puppetlabs.com
- Add support for RHEL/CentOS
- Use xinetd rather than inetd
- Enable xinetd by default
0.1.1 2012-06-25 Puppet Labs info@puppetlabs.com
- Add recurse support for tftp::file.
- Add source defaults for tftp::file.
- Add travis ci and puppet spec_helper support.
0.1.0 2012-05-1 Puppet Labs info@puppetlabs.com
- Initial release of module.
Dependencies
- puppetlabs/xinetd (>= 1.1.0)
Copyright (C) 2012 Puppet Labs Inc Puppet Labs can be contacted at: info@puppetlabs.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.