Forge Home

tftp

Installs and manages TFTP service and configuration.

795,004 downloads

527,615 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Jan 10th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetlabs-tftp', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetlabs-tftp
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetlabs-tftp --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppetlabs/tftp — version 1.0.0 Jan 10th 2018

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

  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 relative to the files directory of the calling module, i.e. ($modulepath/acme/files/).

Supported Platforms

The module has been tested on the following platforms. Testing and patches for other platforms are welcomed.

  • Debian 7 (Wheezy)
  • EL 5
  • EL 6
  • Ubuntu 12.04
  • Ubuntu 14.04
  • Ubuntu 16.04