dhcpd
Install, enable and configure a Dynamic Host Control Protocol (DHCP) server.
Version information
released Mar 18th 2021
This version is compatible with:
- Puppet Enterprise 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, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >=2.7.20 <8.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'thias-dhcpd', '1.0.3'
Learn more about managing modules with a PuppetfileDocumentation
thias/dhcpd — version 1.0.3 Mar 18th 2021
puppet-dhcpd
Overview
This module installs and enables a dhcpd server using a pre-existing configuration file or template generated outside of the module's scope. This is because all possible dhcpd configuration files would be hard to base on a single template without introducing lots of complexity, either in the amount of parameters or the structure (hashes) to pass them.
Included are a static dhcpd.conf-example
file to get started, as well as
a simple dhcpd.conf-simple.erb
template for very simple dhcpd servers.
Parameters to the main ::dhcpd
class :
$configsource
: Puppet location of the conf file to use. Default: none$configcontent
: Content of the config file to use. Default: none$dhcpdargs
: Command-line arguments to be added to dhcpd. Default: empty$ensure
: Ensure parameter for the service. Default: undef$enable
: Enable parameter for the service. Default: true
Examples
Pre-existing custom static dhcpd.conf
file :
class { '::dhcpd':
configsource => 'puppet:///modules/mymodule/dhcpd.conf-foo',
# Restrict listening to a single interface
dhcpdargs => 'eth1',
# Default is to enable but allow to be stopped (for active/passive)
ensure => 'running',
}
Trivial configuration using the included example template :
class { '::dhcpd':
configcontent => template('dhcpd/dhcpd.conf-simple.erb'),
}
Slightly more complex configuration using the included example template :
# Variables used from inside the template
$dhcpd_netmask = '255.255.255.0'
$dhcpd_subnet = '192.168.100.0'
$dhcpd_routers = '192.168.100.1'
$dhcpd_domain_name_servers = '192.168.100.1,192.168.100.2'
$dhcpd_range_start = '100'
$dhcpd_range_end = '254'
$dhcpd_default_lease_time = '3600'
$dhcpd_max_lease_time = '21600'
class { '::dhcpd':
configcontent => template('dhcpd/dhcpd.conf-simple.erb'),
ensure => 'running',
}
2021-03-18 - 1.0.3
- Update dhcp-server package name on RHEL8+.
2019-11-20 - 1.0.2
- Add dhcpd file validation (#2, @osgpcq).
2015-10-07 - 1.0.1
- Include example dhcpd.conf template.
- Update README.
2015-04-28 - 1.0.0
- Fix OS version comparison for Puppet 4.
- Replace Modulefile with metadata.json.
2014-01-29 - 0.3.2
- Add missing owner, group and mode for files.
2013-04-19 - 0.3.1
- Use @varname syntax in templates to silence puppet 3.2 warnings.
2013-03-08 - 0.3.0
- Update README and use markdown.
- Change to 2 space indent.
- Allow dhcpd.conf to also be content, for templates to work.
2012-09-19 - 0.2.2
- Lower the lease time in the example, much more useful in the real world.
2012-04-25 - 0.2.1
- Fix sysconfig template when setting multiple command line options.
2012-04-08 - 0.2.0
- Clean up the module to match current puppetlabs guidelines.
Copyright (C) 2011-2015 Matthias Saou 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.