Version information
released Feb 18th 2016
This version is compatible with:
- Puppet >= 3.0.0 < 4.0.0
- , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'theforeman-dhcp', '2.3.0'Learn more about managing modules with a PuppetfileDocumentation
theforeman/dhcp — version 2.3.0 Feb 18th 2016
DHCP module for Puppet
DHCP module for theforeman. Based on original DHCP module by ZLeslie, thanks to him for the original work.
Installs and manages a DHCP server.
Dependencies
- Native-type Concat module (https://github.com/onyxpoint/pupmod-concat)
Features
- Multiple subnet support
- Host reservations
- Secure dynamic DNS updates when combined with Bind
Usage
Define the server and the zones it will be responsible for.
class { 'dhcp':
dnsdomain => [
'dc1.example.net',
'1.0.10.in-addr.arpa',
],
nameservers => ['10.0.1.20'],
interfaces => ['eth0'],
dnsupdatekey => "/etc/bind/keys.d/$ddnskeyname",
require => Bind::Key[ $ddnskeyname ],
pxeserver => '10.0.1.50',
pxefilename => 'pxelinux.0',
}
dhcp::pool
Define the pool attributes
dhcp::pool{ 'ops.dc1.example.net':
network => '10.0.1.0',
mask => '255.255.255.0',
range => '10.0.1.100 10.0.1.200',
gateway => '10.0.1.1',
}
Override global attributes with pool specific
dhcp::pool{ 'ops.dc1.example.net':
network => '10.0.1.0',
mask => '255.255.255.0',
range => '10.0.1.100 10.0.1.200',
gateway => '10.0.1.1',
nameservers => ['10.0.1.2', '10.0.2.2'],
pxeserver => '10.0.1.2',
}
For the support of static routes (RFC3442):
dhcp::pool{ 'ops.dc1.example.net':
network => '10.0.1.0',
mask => '255.255.255.0',
range => '10.0.1.100 10.0.1.200',
gateway => '10.0.1.1',
static_routes => [ { 'mask' => '32', 'network' => '169.254.169.254', 'gateway' => $ip } ],
}
dhcp::host
Create host reservations.
dhcp::host {
'server1': mac => "00:50:56:00:00:01", ip => "10.0.1.51";
'server2': mac => "00:50:56:00:00:02", ip => "10.0.1.52";
'server3': mac => "00:50:56:00:00:03", ip => "10.0.1.53";
}
Contributors
Zach Leslie zach.leslie@gmail.com Ben Hughes git@mumble.org.uk Greg Sutcliffe greg.sutcliffe@gmail.com
Changelog
2.3.0
- Add dhcp::failover class to configure DHCP failover between servers
- Add includes parameter to include other config files
- Handle and ignore an empty omapi_key parameter
- Add tests for dhcp::dhcp_class
- Support Puppet 3.0 minimum
- Support Fedora 21, remove Debian 6 (Squeeze)
2.2.0
- Add pools, hosts parameters to dhcp to automatically create dhcp::pool and dhcp::host resources, usable from Hiera and Foreman
- Add ddns_domainname and ddns_rev_domainname parameters to dhcp
- Add ntpservers parameter to dhcp
- Permit the dhcp::pool range parameter to be an array of ranges
2.1.0
- Support configuration on FreeBSD
- Add options parameter for arbitrary options
- Add dhcp::class define to add new DHCP class definitions
- Add pool_parameters param to dhcp::pool for allow statements etc.
- Add authoritative parameter
- Add search_domains parameter to dhcp::pool
- Add omapi_name/omapi_key parameters
2.0.0
- Add parameters to dhcp and dhcp:pool to configure static routes
- Change theforeman-concat_native to puppetlabs-concat
- Fix quoting of domain-name option
- Test with future parser and Puppet 4
1.6.0
- Add
parameters,optionsparameters to dhcp::pool - Add
default_lease_time,max_lease_timeparameters to dhcp - Use longer ISC defaults for lease times
- Minimising differences to puppetlabs/dhcp for eventual merger
- Do not set domain-name option if dnsdomain parameter is empty
- Strip pool config values before checking if they should be set
- Removing unused code, tidyups, better test coverage, increased linting
1.5.0
- Add nameservers parameter to dhcp::pool
- Fix config output when empty pool range is passed
1.4.0
- Add pxeserver parameter to dhcp::pool
- Unsetting pxeserver/pxefilename disables PXE in a subnet
- Add tests, fix lint and style issues
1.3.1
- Change Debian package name to prevent reinstallation on each run
- Fix puppet-lint issues
Dependencies
- puppetlabs/concat (>= 1.0.0 < 3.0.0)
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.