Puppet module for deploying dhcp
Ruby Puppet HTML
Latest commit 0d80af5 Feb 11, 2017 @sacres sacres committed on GitHub Merge pull request #143 from voxpupuli/modulesync
modulesync 0.20.0
Permalink
Failed to load latest commit information.
.github modulesync 0.16.4 Dec 21, 2016
examples Fix remaining spec tests May 22, 2016
files Fixup for code contribution in voxpupuli/puppet-dhcp#16 Feb 3, 2015
manifests
spec modulesync 0.20.0 Feb 11, 2017
templates
.fixtures.yml
.gitignore modulesync 0.20.0 Feb 11, 2017
.msync.yml modulesync 0.20.0 Feb 11, 2017
.pmtignore modulesync 0.20.0 Feb 11, 2017
.rspec modulesync 0.6.1 May 16, 2016
.rubocop.yml
.sync.yml add .sync.yml May 22, 2016
.travis.yml modulesync 0.19.3 Jan 18, 2017
.yardopts
CHANGELOG.md fix CHANGELOG.md Jan 12, 2017
CONTRIBUTING.md modulesync 0.6.3 May 22, 2016
Gemfile modulesync 0.20.0 Feb 11, 2017
LICENSE Add apache 2.0 license. Sep 30, 2013
README.md add parameter list (#128) Dec 30, 2016
Rakefile modulesync 0.19.3 Jan 18, 2017
metadata.json bump required puppet version to 4.6.1 Jan 12, 2017

README.md

DHCP module for Puppet

Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Overview

Installs and manages a DHCP server.

Features

  • Multiple subnet support
  • Host reservations
  • Secure dynamic DNS updates when combined with Bind
  • Can create a dummy (ignored) subnet so that the server can be used only as a helper-address target

Usage

Define the server and the zones it will be responsible for.

class { 'dhcp':
  service_ensure => running,
  dnsdomain      => [
    'dc1.example.net',
    '1.0.10.in-addr.arpa',
  ],
  nameservers  => ['10.0.1.20'],
  ntpservers   => ['us.pool.ntp.org'],
  interfaces   => ['eth0'],
  dnsupdatekey => '/etc/bind/keys.d/rndc.key',
  dnskeyname   => 'rndc-key',
  require      => Bind::Key['rndc-key'],
  pxeserver    => '10.0.1.50',
  pxefilename  => 'pxelinux.0',
  omapi_port   => 7911,
}

dhcp::pool

Define the pool attributes. This example will create a pool, which serves IPs of two different ranges in the same network.

dhcp::pool{ 'ops.dc1.example.net':
  network => '10.0.1.0',
  mask    => '255.255.255.0',
  range   => ['10.0.1.10 10.0.1.100', '10.0.1.200 10.0.1.250' ],
  gateway => '10.0.1.1',
}

dhcp::ignoredsubnet

Define a subnet that will be ignored - useful for making the DHCP server only respond to requests forwarded by switches etc.

dhcp::ignoredsubnet{ 'eth0':
  network => '10.0.0.0',
  mask    => '255.255.255.0',
}

dhcp::host

Create host reservations.

dhcp::host { 'server1':
  comment => 'Optional descriptive comment',
  mac     => '00:50:56:00:00:01',
  ip      => '10.0.1.51',
}

parameters

Parameters are available to configure pxe or ipxe

Boot ipxe from pxe. When configured this overrides pxefilename. For more information see ipxe.org.

class { 'dhcp':
  ipxe_filename  => 'undionly.kpxe',
  ipxe_bootstrap => 'bootstrap.kpxe',
  pxeserver      => '10.0.1.50',
}

The following is the list of all parameters available for this class.

Parameter Data Type Default Value
authoritative Boolean true
ddns_update_static String 'on'
ddns_update_style String 'interim'
ddns_update_optimize String 'on'
default_lease_time Integer 43200
dhcp_conf_ddns String 'INTERNAL_TEMPLATE'
dhcp_conf_extra String 'INTERNAL_TEMPLATE'
dhcp_conf_fragments Hash {}
dhcp_conf_header String 'INTERNAL_TEMPLATE'
dhcp_conf_ntp String 'INTERNAL_TEMPLATE'
dhcp_conf_pxe String 'INTERNAL_TEMPLATE'
dhcp_dir String $dhcp::params::dhcp_dir
dhcpd_conf_filename String 'dhcpd.conf'
dnsdomain Array undef
dnskeyname String undef
dnssearchdomains Array []
dnsupdatekey String undef
extra_config String ''
globaloptions String ''
interface String 'NOTSET'
interfaces Array undef
ipxe_bootstrap String undef
ipxe_filename String undef
ldap_base_dn String 'dc=example, dc=com'
ldap_debug_file String undef
ldap_method String 'dynamic'
ldap_password String ''
ldap_port Integer 389
ldap_server String 'localhost'
ldap_username String 'cn=root, dc=example, dc=com'
logfacility String 'daemon'
max_lease_time Integer 86400
mtu Integer undef
nameservers Array [ '8.8.8.8', '8.8.4.4' ]
nameservers_ipv6 Array []
ntpservers Array []
omapi_port Integer undef
option_code150_label String pxegrub
option_code150_value String text
package_provider String $dhcp::params::package_provider
packagename String $dhcp::params::packagename
pxefilename String undef
pxeserver String undef
service_ensure Enum running
servicename String $dhcp::params::servicename
use_ldap Boolean false

Contributors

Zach Leslie zach.leslie@gmail.com Ben Hughes git@mumble.org.uk Sam Dunster sdunster@uow.edu.au Garrett Honeycutt gh@learnpuppet.com Matt Kirby mk.kirby@gmail.com