Forge Home

dhcpd

Install, enable and configure a Dynamic Host Control Protocol (DHCP) server.

13,696 downloads

1,012 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.3 (latest)
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.2
  • 0.2.1
  • 0.2.0
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

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

Add this module to your Puppetfile:

mod 'thias-dhcpd', '1.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thias-dhcpd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thias-dhcpd --version 1.0.3

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
Tags: dhcp, dhcpd

Documentation

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',
}