Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'simp-tftpboot', '6.8.1'
Learn more about managing modules with a PuppetfileDocumentation
pupmod-simp-tftpboot
Table of Contents
Description
Sets up a tftpboot server.
See REFERENCE.md for the full API reference.
Setup
Install simp/tftpboot
to your module path. A SIMP rsync server must also be in
place to use the tftpboot module.
What tftpboot affects
Manages the following:
tftp-server
packagetftp
service (viaxinetd
)/var/lib/tftpboot/linux-install
directory and its contents
Usage
include tftpboot
See the SIMP Documentation for detailed examples of using this module.
Limitations
SIMP Puppet modules are generally intended for use on Red Hat Enterprise
Linux and compatible distributions, such as CentOS. Please see the
metadata.json
file for the most up-to-date list of
supported operating systems, Puppet versions, and module dependencies.
Development
Please read our Contribution Guide.
If you find any issues, they can be submitted to our JIRA.
Reference
Table of Contents
Classes
tftpboot
: class tftpboot Sets up a tftpboot server.tftpboot::config
: Configuration class called from tftpboot.tftpboot::config::bios
: Configuration class called from tftpboot::config.tftpboot::config::efi
: Configuration class called from tftpboot::config.
Defined types
tftpboot::assign_host
: define tftpboot:assign_host Sets up links totemplates/$model
in thetftpboot.cfg/
sub-directory of$::tftpboot::install_root_dir
tftpboot::assign_host_efi
: define tftpboot:assign_host_efi Sets up links totemplates/$model
in theefi/
sub-directory of$::tftpboot::install_root_dir
tftpboot::generic_model
: define tftpboot:generic_model This define is for generic entries used to PXEboot a server. The generic entries will be written to `$::tftpbotftpboot::linux_model
: Add a TFTPBoot Linux model entry for BIOS boottftpboot::linux_model_efi
: Add a TFTPBoot Linux model entry for UEFI boot
Functions
tftpboot::get_os_base_filenames
: Returns an array of base filenames for all OS PXEboot files contained in the input Hash
Classes
tftpboot
class tftpboot
Sets up a tftpboot server.
Parameters
The following parameters are available in the tftpboot
class:
tftpboot_root_dir
linux_install_dir
trusted_nets
rsync_enabled
rsync_source
rsync_server
rsync_timeout
purge_configs
use_os_files
os_file_info
package_ensure
tftpboot_root_dir
Data type: Stdlib::Absolutepath
The root directory of tftboot.
Default value: '/var/lib/tftpboot'
linux_install_dir
Data type: String
The name of a sub-directory of $tftpboot_root_dir
(relative path) that
contains files used to PXEboot a server.
Default value: 'linux-install'
trusted_nets
Data type: Simplib::Netlist
See only_from
in xinetd.conf(5)
.
Default value: simplib::lookup('simp_options::trusted_nets', { 'default_value' => ['127.0.0.1', '::1'] })
rsync_enabled
Data type: Boolean
Whether to use rsync to efficiently pull initial boot files from a central
location (i.e., the rsync server) and install them into
$tftpboot_root_dir
. When set to false
, you must provide some other
mechanism to install the initial boot files into
$tftpboot_root_dir
.
Default value: true
rsync_source
Data type: String
The source of the content to be rsync'd.
Default value: "tftpboot_${::environment}_${facts['os']['name']}/*"
rsync_server
Data type: String
The rsync server FQDN from which to pull the tftpboot configuration. This should contain the entire PXEboot hierarchy if you wish to use this to PXEboot servers.
Default value: simplib::lookup('simp_options::rsync::server', { 'default_value' => '127.0.0.1' })
rsync_timeout
Data type: Integer
The connection timeout for the rsync connections.
Default value: simplib::lookup('simp_options::rsync::timeout', { 'default_value' => 2 })
purge_configs
Data type: Boolean
Determines if non puppet-managed configuration files in
$tftpboot_root_dir/$linux_install_dir/pxelinux.cfg
get purged. At this
time, there is no purge mechanism for
$tftpboot_root_dir/$linux_install_dir/efi
, which contains both
configuration and initial boot files.
Default value: true
use_os_files
Data type: Boolean
If true
, use the OS provided syslinux and grub packages to obtain the
initial boot files (e.g., pxelinux.0
, menu.c32
, grub.efi
,
grubx64.efi
, shim.efi
).
Default value: true
os_file_info
Data type: Hash
Hash of Hashes containing the mapping of OS packages to initial boot files. The outer Hash key is either 'bios' or 'efi', corresponding to BIOS or UEFI boot, respectively. The inner Hash is a Hash of Arrays. Each inner Hash key is an OS package. Each inner Hash value is the list of PXEboot files provided by the named package. See the module data for specifics.
package_ensure
Data type: String
The ensure
setting of packages to be installed.
Default value: simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' })
tftpboot::config
Configuration class called from tftpboot.
tftpboot::config::bios
Configuration class called from tftpboot::config.
tftpboot::config::efi
Configuration class called from tftpboot::config.
Defined types
tftpboot::assign_host
define tftpboot:assign_host
Sets up links to templates/$model
in the tftpboot.cfg/
sub-directory of $::tftpboot::install_root_dir
Parameters
The following parameters are available in the tftpboot::assign_host
defined type:
model
Data type: String
Should be the name of a previously defined model
ensure
Data type: Enum['absent','link']
Ensure for files managed.
Default value: 'link'
tftpboot::assign_host_efi
define tftpboot:assign_host_efi
Sets up links to templates/$model
in the efi/
sub-directory of $::tftpboot::install_root_dir
Parameters
The following parameters are available in the tftpboot::assign_host_efi
defined type:
legacy_grub
Data type: Boolean
Whether this host uses legacy grub.
Default value: false
model
Data type: String
Should be the name of a previously defined model
ensure
Data type: Enum['absent','link']
Ensure for files managed.
Default value: 'link'
tftpboot::generic_model
define tftpboot:generic_model
This define is for generic entries used to PXEboot a server.
The generic entries will be written to
$::tftpboot::tftpboot_root_dir/pxe-linux/templates
.
== Parameters
Parameters
The following parameters are available in the tftpboot::generic_model
defined type:
content
Data type: String
The actual verbatim content of the entry.
ensure
Data type: Enum['absent','present']
Ensure for files managed.
Default value: 'present'
tftpboot::linux_model
Add a TFTPBoot Linux model entry for BIOS boot
Parameters
The following parameters are available in the tftpboot::linux_model
defined type:
kernel
Data type: String
The location of the kernel within the tftpboot tree.
Path is relative to $::tftpboot::install_root_dir
.
initrd
Data type: String
The location of the initial RAM disk within the tftpboot tree.
Path is relative to $::tftpboot::install_root_dir
.
ks
Data type: String
The full URL to the location of the kickstart file.
extra
Data type: Optional[String]
Any other kernel parameters that you would like to pass at boot. You will probably want this to be 'ksdevice=bootif\nIPAPPEND 2' if you are kickstarting systems.
Default value: undef
ensure
Data type: Enum['absent','present']
Set or delete this entry. Options: ['absent'|'present']
Default value: 'present'
fips
Data type: Boolean
If true, enables FIPS in the kernel parameters at PXE time. This may not work with all initrd images.
Default value: false
tftpboot::linux_model_efi
Add a TFTPBoot Linux model entry for UEFI boot
Parameters
The following parameters are available in the tftpboot::linux_model_efi
defined type:
kernel
Data type: String
The location of the kernel within the tftpboot tree.
Path is relative to $::tftpboot::install_root_dir
.
initrd
Data type: String
The location of the initial RAM disk within the tftpboot tree.
Path is relative to $::tftpboot::install_root_dir
.
ks
Data type: String
The full URL to the location of the kickstart file.
extra
Data type: Optional[String]
Any other kernel parameters that you would like to pass at boot. You will probably want this to be 'ksdevice=bootif\nIPAPPEND 2' if you are kickstarting systems.
Default value: undef
ensure
Data type: Enum['absent','present']
Set or delete this entry. Options: ['absent'|'present']
Default value: 'present'
fips
Data type: Boolean
If true, enables FIPS in the kernel parameters at PXE time. This may not work with all initrd images.
Default value: false
legacy_grub
Data type: Boolean
Whether this host uses legacy grub.
Default value: false
Functions
tftpboot::get_os_base_filenames
Type: Puppet Language
Returns an array of base filenames for all OS PXEboot files contained in the input Hash
tftpboot::get_os_base_filenames(Hash $os_file_info)
Returns an array of base filenames for all OS PXEboot files contained in the input Hash
Returns: Array
Array of base filenames
os_file_info
Data type: Hash
Hash of Hashes. The outer Hash key is either 'bios' or 'efi', corresponding to BIOS or UEFI boot, respectively. The inner Hash is a Hash of Arrays. Each inner Hash key is an OS package. Each inner Hash value is the list of PXEboot files provided by the named package. See the module data for specifics.
- Wed Jan 17 2024 Richard Gardner rick@sicura.us - 6.8.1
- Updated hiera.yaml facts to support puppet 8
- Mon Oct 23 2023 Steven Pritchard steve@sicura.us - 6.8.0
- Add EL9 support
- Wed Oct 11 2023 Steven Pritchard steve@sicura.us - 6.7.0
- [puppetsync] Updates for Puppet 8
- These updates may include the following:
- Update Gemfile
- Add support for Puppet 8
- Drop support for Puppet 6
- Update module dependencies
- These updates may include the following:
- Tue Sep 26 2023 Steven Pritchard steve@sicura.us - 6.6.0
- Add AlmaLinux 8 support
- Mon Jul 24 2023 Chris Tessmer chris.tessmer@onyxpoint.com - 6.5.0
- Add RockyLinux 8 support
- Wed Jul 14 2021 Trevor Vaughan tvaughan@onyxpoint.com - 6.4.1
- Updated PXE file lists for EL8 systems
- Thu Jun 17 2021 Chris Tessmer chris.tessmer@onyxpoint.com - 6.4.0
- Removed support for Puppet 5
- Ensured support for Puppet 7 in requirements and stdlib
- Wed Jan 13 2021 Chris Tessmer chris.tessmer@onyxpoint.com - 6.3.2
- Removed EL6 from supported OSes
- Thu Oct 22 2020 Chris Tessmer chris.tessmer@onyxpoint.com - 6.3.1-0
- (Re-)preserve rsync'd files' ownership, permissions, and SELinux contexts
- Tue Dec 03 2019 Trevor Vaughan tvaughan@onyxpoint.com - 6.3.0-0
- Update README.md
- Add REFERENCE.md
- Add EL8 support
- Update GitLab configuration
- Add a basic acceptance test
- Update dependency versions in metadata.json
- Fix manifest ordering
- Tue Dec 03 2019 Mike Renfro mike+github@renf.ro - 6.3.0-0
- Fix rsync target to match README
- Fri Aug 02 2019 Robert Vincent pillarsdotnet@gmail.com - 6.3.0-0
- Remove Puppet 4 support
- Add Puppet 6 support
- Add puppetlabs-stdlib 6 support
- Tue Mar 19 2019 Liz Nemsick lnemsick.simp@gmail.com - 6.2.2-0
- Use simplib::nets2ddq in lieu of deprecated Puppet 3 nets2ddq
- Thu Mar 07 2019 Liz Nemsick lnemsick.simp@gmail.com - 6.2.1-0
- Update the upper bound of stdlib to < 6.0.0
- Update a URL in the README.md
- Thu Sep 13 2018 Nicholas Markowski nicholas.markowski@onyxpoint.com - 6.2.0-0
- Added Puppet 5 and OEL support
- Mon Sep 10 2018 Liz Nemsick lnemsick.simp@gmail.com - 6.2.0-0
- Update Hiera 4 to Hiera 5
- Tue Apr 24 2018 Liz Nemsick lnemsick.simp@gmail.com - 6.1.0-0
- Added support for UEFI PXEboot.
- Added tftpboot::linux_model_efi. Added tftpboot::assign_host_efi.
- Tested primarily on CentOS 7 (grub2). Testing of CentOS 6 UEFI boot with legacy grub is pending.
- Moved the tftproot root directory from /tftpboot to /var/lib/tftpboot to satisfy the STIG RHEL-07-040520 check.
- Added tftpboot::tftpboot_root_dir to allow users to override the new default root directory (e.g., to set it back to /tftpboot).
- Added tftpboot::linux_install_dir and tftpboot::package_ensure to allow more fine-grained control of this module.
- Explicitly set selinux context on tfptboot files/directories to tftpdir_t in order to restrict their access to read-only tftpd operation.
- Internally, refactored configuration to use small, private classes.
- Tue Dec 05 2017 Steven Pritchard steven.pritchard@onyxpoint.com - 6.0.2-0
- Update README.md from puppet strings
- Thu Jul 06 2017 Liz Nemsick lnemsick.simp@gmail.com - 6.0.1-0
- Confine puppet version in metadata.json
- Wed Dec 14 2016 Liz Nemsick lnemsick.simp@gmail.com - 6.0.0-0
- Use simp_options module for global catalysts
- Use strongly typed parameters
- Thu Dec 01 2016 Trevor Vaughan tvaughan@onyxpoint.com - 6.0.0-0
- Updated to use the environment-aware rsync in SIMP 6
- Tue Nov 22 2016 Jeanne Greulich jgreulich@onypoint.com - 5.0.0-0
- bump major version for SIMP6
- Mon Nov 21 2016 Chris Tessmer chris.tessmer@onypoint.com - 4.1.3-0
- Remove compliance_map and general housekeeping
- Mon Jul 11 2016 Trevor Vaughan tvaughan@onyxpoint.com - 4.1.2-0
- Migration to semantic versioning and fix of the build system
- Wed May 11 2016 Nick Markowski nmarkowski@keywcorp.com - 4.1.1-0
- Inclusion of FIPS in the initrd kickstart option list is now optional. By default, we no longer set fips=1 in initrd.
- Wed Mar 02 2016 Chris Tessmer chris.tessmer@onyxpoint.com - 4.1.0-9
- Minor linting fixes
- Mon Nov 09 2015 Chris Tessmer chris.tessmer@onypoint.com - 4.1.0-8
- migration to simplib and simpcat (lib/ only)
- Mon Jul 27 2015 Trevor Vaughan tvaughan@onyxpoint.com - 4.1.0-7
- Updated to use the system-provided files where possible.
- Fri Jan 16 2015 Trevor Vaughan tvaughan@onyxpoint.com - 4.1.0-6
- Changed puppet-server requirement to puppet
- Mon Dec 15 2014 Nick Markowski nmarkowski@keywcorp.com - 4.1.0-5
- Made purging pxelinux.cfg optional.
- Tue Aug 12 2014 Kendall Moore kmoore@keywcorp.com - 4.1.0-4
- Allow FIPS to be enabled/disabled via hiera.
- Thu Jul 10 2014 Nick Markowski nmarkowski@keywcorp.com - 4.1.0-3
- Diabled FIPS (for now).
- Sun Jun 22 2014 Kendall Moore kmoore@keywcorp.com - 4.1.0-2
- Removed MD5 file checksums for FIPS compliance.
- Added FIPS enabling to TFTP boot profile.
- Mon Apr 14 2014 Trevor Vaughan tvaughan@onyxpoint.com - 4.1.0-1
- Collapsed tftpboot::service into tftpboot
- Tue Jan 14 2014 Kendall Moore kmoore@keywcorp.com - 4.1.0-0
- Update to tftpboot::assign_host to explicitly set the owner, group, and mode.
- Thu Jan 09 2014 Nick Markowski nmarkowski@keywcorp.com - 2.1.0-0
- Updated module for puppet3/hiera compatibility, and optimized code for lint tests, and puppet-rspec.
- Fixed permissions issue on pxe template.
- Tue Oct 08 2013 Kendall Moore kmoore@keywcorp.com - 2.0.0-9
- Updated all erb templates to properly scope variables.
- Mon Feb 25 2013 Maintenance 2.0.0-8
- Added a call to $::rsync_timeout to the rsync call since it is now required.
- Create a Cucumber test which ensures that the xinetd service is running, the tftpboot file is in place, and puppet runs successfully.
- Wed Jul 25 2012 Maintenance 2.0.0-7
- Removed the tidy->file loop.
- Wed Apr 11 2012 Maintenance 2.0.0-6
- Moved mit-tests to /usr/share/simp...
- Updated pp files to better meet Puppet's recommended style guide.
- Fri Mar 02 2012 Maintenance 2.0.0-5
- Improved test stubs.
- Mon Dec 26 2011 Maintenance 2.0.0-4
- Updated the spec file to not require a separate file list.
- Scoped all of the top level variables.
- Mon Dec 05 2011 Maintenance 2.0.0-3
- Modified the upcase/downcase match to work with an array match puppet > 2.6
- Fri Aug 12 2011 Maintenance 2.0.0-2
- Added some notes about probably wanting 'ksdevice=bootif\nIPAPPEND 2' in 'extra' if you're kickstarting.
- Tue Mar 29 2011 Maintenance - 2.0.0-1
- The tftpboot module now expects to have an associated rsync space that is password protected.
- Updated to use rsync native type
- Tue Jan 11 2011 Maintenance 2.0.0-0
- Refactored for SIMP-2.0.0-alpha release
- Tue Oct 26 2010 Maintenance - 1-1
- Converting all spec files to check for directories prior to copy.
- Tue May 25 2010 Maintenance 1.0-0
- Removed unnecessary variable.
- Code refactoring.
- Sat Feb 13 2010 Maintenance 0.2-3
- Fixed the annoying preceeding spaces.
- Fri Jan 15 2010 Maintenance 0.2-2
- Now properly set group of tftpboot files to 'nobody'
Dependencies
- puppetlabs/stdlib (>= 8.0.0 < 10.0.0)
- simp/xinetd (>= 4.0.0 < 5.0.0)
- simp/rsync (>= 6.1.1 < 7.0.0)
- simp/simplib (>= 4.9.0 < 5.0.0)
pupmod-simp-tftpboot - A Puppet Module for managing Tftpboot -- Per Section 105 of the Copyright Act of 1976, these works are not entitled to domestic copyright protection under US Federal law. The US Government retains the right to pursue copyright protections outside of the United States. The United States Government has unlimited rights in this software and all derivatives thereof, pursuant to the contracts under which it was developed and the License under which it falls. --- 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.