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 'ghoneycutt-dnsclient', '6.0.0'
Learn more about managing modules with a PuppetfileDocumentation
dnsclient
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with dnsclient
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Module description
This module manages /etc/resolv.conf
and its various options. It is
feature complete for the supported platforms.
Documented with puppet-strings
Setup
What dnsclient affects
Manages the system resolver, /etc/resolv.conf
.
Setup requirements
This module requires stdlib
.
Beginning with dnsclient
Include the dnsclient
class and it will configure the resolver to use
Google's public name servers.
Usage
Minimal and normal usage. See the examples directory for more usage examples.
include dnsclient
Limitations
This module officially supports the platforms listed in the
metadata.json
. It does not fail on unsupported platforms and has been
known to work on many, many platforms since its creation in 2010 and
should work with any unix based platform that uses /etc/resolv.conf
.
Development
See CONTRIBUTING.md
License
See LICENSE file.
Reference
Table of Contents
Classes
dnsclient
: Manage DNS resolver
Classes
dnsclient
This module manages /etc/resolv.conf
.
Parameters
The following parameters are available in the dnsclient
class:
nameservers
nameserver_limit
options
search
domain
sortlist
custom_lines
resolver_config_file
resolver_config_file_ensure
resolver_config_file_owner
resolver_config_file_group
resolver_config_file_mode
resolver_config_backup
nameservers
Data type: Array[Stdlib::IP::Address]
Array of nameservers. The default use Google's public name servers.
Default value: ['8.8.8.8', '8.8.4.4']
nameserver_limit
Data type: Optional[Integer[0]]
Integer of the number of nameservers to allow in the resolv.conf NOTE: If 'nameservers' is over this limit, only the first X nameservers will be used where X is set by this limit. The nameservers over the limit will be discarded.
Default value: undef
options
Data type: Array
Array of options. Set to []
if no options line should be present.
Default value: ['rotate', 'timeout:1']
search
Data type: Optional[Array[String[1]]]
Optional array of domains for search list. This is mutually exclusive with domain
.
Default value: undef
domain
Data type: Optional[Stdlib::Fqdn]
Optional domain setting. This is mutually exclusive with search
.
Default value: undef
sortlist
Data type: Optional[Array[String[1]]]
Optional array of sortlist entries
Default value: undef
custom_lines
Data type: Array[String[1]]
Array of lines that will be added to the end of /etc/resolv.conf
Default value: []
resolver_config_file
Data type: Stdlib::Absolutepath
Path to resolv.conf
Default value: '/etc/resolv.conf'
resolver_config_file_ensure
Data type: String[1]
Value of ensure attribute for the /etc/resolv.conf file resource
Default value: 'file'
resolver_config_file_owner
Data type: String[1]
User of /etc/resolv.conf
Default value: 'root'
resolver_config_file_group
Data type: String[1]
Group of /etc/resolv.conf
Default value: 'root'
resolver_config_file_mode
Data type: Stdlib::Filemode
Mode of /etc/resolv.conf in octal format
Default value: '0644'
resolver_config_backup
Data type: Optional[Variant[Boolean, String[1]]]
Sets the 'backup' parameter for /etc/resolv.conf
Default value: undef
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v6.0.0 (2023-11-16)
Merged pull requests:
- Support custom lines in /etc/resolv.conf #47 (treydock)
- Add resolver_config_backup parameter #46 (treydock)
- Allow setting nameservers limit #45 (treydock)
- Support Puppet 8 and stdlib 9.x #44 (treydock)
v5.0.0 (2022-09-19)
Merged pull requests:
- Support Puppet 7 and use PDK #42 (ghoneycutt)
v4.1.0 (2021-04-19)
v4.0.0 (2021-04-19)
Merged pull requests:
- Modernize #40 (ghoneycutt)
- Remove EOL Puppet Versions #39 (BuJo)
v3.6.0 (2018-12-09)
Merged pull requests:
- Add support for Puppet 6 #35 (Phil-Friderici)
- Make it explicit that this module is compatible with Puppet 5 #34 (mattock)
- Support Puppet 4.9 #30 (Phil-Friderici)
v3.5.2 (2016-11-12)
Merged pull requests:
- Maintenance #29 (ghoneycutt)
v3.5.1 (2016-08-31)
v3.5.0 (2016-08-31)
Merged pull requests:
- Support ruby 231 #26 (ghoneycutt)
- Fix Travis-ci matrix so that each feature release is tested #24 (ghoneycutt)
v3.4.0 (2015-05-27)
Merged pull requests:
- Support Puppet v4 and v3 w/ future parser #23 (ghoneycutt)
v3.3.0 (2015-03-18)
Merged pull requests:
- Prep for v3.3.0 #21 (ghoneycutt)
v3.2.0 (2014-10-06)
v3.1.1 (2014-09-15)
Merged pull requests:
- Fix travis-ci image in README #16 (ghoneycutt)
- Gemfile to reflect that 2.7 support has been dropped #15 (ghoneycutt)
- Remove Travis work around for ruby v1.8.7 #14 (ghoneycutt)
- Drop 2.7 support entirely #13 (ghoneycutt)
- Bugfix Travis testing ruby 1.8.7 and add Puppet 3.4.2 #12 (ghoneycutt)
- Support rspec-puppet v1.0.0 #11 (ghoneycutt)
v3.1.0 (2013-12-10)
Merged pull requests:
v3.0.5 (2013-11-14)
Merged pull requests:
- Support Ruby 1.9 #9 (ghoneycutt)
- Add normalize testing. #8 (narf-)
- Catch Puppet::Error in spec tests #6 (ghoneycutt)
v3.0.4 (2013-06-08)
Merged pull requests:
- Add @ to variables in template. #5 (ghoneycutt)
- Fix fixtures so stdlib v3.2.0 is tracked. #4 (ghoneycutt)
- Drop support for Puppet v2.6 #2 (ghoneycutt)
- Remove param docs from manifest. #1 (ghoneycutt)
3.6.0 - 2018-12-08
- Support Puppet versions 5 and 6.
3.5.2 - 2016-10-12
- Explicitly support puppet-lint v2
3.5.1 - 2016-08-31
- No changes, just another release to appease an issue with the Forge.
3.5.0 - 2016-08-31
- Add support for Ruby v2.3.1
3.4.0 - 2015-05-27
- Support Puppet v4 and v3 with future parser
3.0.4 - 2013-06-08 Garrett Honeycutt code@garretthoneycutt.com
- Fix warnings by using @ in front of variables in template
- .fixtures.yml is tracking correct version of puppetlabs/stdlib
- Drop Puppet v2.6 from travis-ci
- anders-larsson updates README to document support for SLES 10
- anders-larsson updates README to document support for all EL, not just CentOS
3.0.1 - 2013-03-16 Garrett Honeycutt code@garretthoneycutt.com
- fixed spec bug relating to lack of .fixtures.yml
- cleaned up testing framework
3.0.0 - 2013-03-16 Garrett Honeycutt code@garretthoneycutt.com
- Switched to semantic versioning - http://semver.org
- Implemented new design pattern that manages data with Hiera
- Truly portable module! Code is completely data driven, so you can make changes through Hiera and never have to edit the code itself.
2.0.0 - 2011-09-09 Garrett Honeycutt garrett@puppetlabs.com
- Implemented design pattern based on http://www.puppetlabs.com/blog/design-pattern-for-dealing-with-data/
1.0.1 - 2010-09-24 Garrett Honeycutt code@garretthoneycutt.com
- Added documentation
1.0.0 - 2010-06-24 Garrett Honeycutt code@garretthoneycutt.com
- Initial release
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 8.0.0 < 10.0.0)
Copyright (C) 2010-2023 Garrett Honeycutt <code@garretthoneycutt.com> 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.