Version information
This version is compatible with:
- RedHat, CentOS, OracleLinux, Scientific, Suse, Debian, Ubuntu, FreeBSD, OpenBSD, Gentoo, ArchLinux, AIX, Solaris
Start using this module
Add this module to your Puppetfile:
mod 'saz-resolv_conf', '8.0.1'Learn more about managing modules with a PuppetfileDocumentation
puppet-resolv_conf 
Manage resolv.conf via Puppet
Usage
class { 'resolv_conf':
nameservers => ['192.168.1.1', '192.168.2.2', '192.168.3.3'],
}
Different domain than current machine
class { 'resolv_conf':
nameservers => ['192.168.1.1', '192.168.2.2', '192.168.3.3'],
domainname => 'different.example.com',
}
Different searchpath
class { 'resolv_conf':
nameservers => ['192.168.1.1', '192.168.2.2', '192.168.3.3'],
searchpath => ['sub1.example.com', 'sub2.example.com'],
}
Reference
Table of Contents
Classes
resolv_conf: Manage resolv.conf settings
Classes
resolv_conf
== Class: resolv_conf
Parameters
The following parameters are available in the resolv_conf class:
nameserversconfig_fileconfig_templateuse_resolvconfupdate_cmdpackagemanage_packagepackage_ensuredomainnamesearchpathoptionsmode
nameservers
Data type: Array
List of nameservers
config_file
Data type: String
Config file
config_template
Data type: String
Config template to use
use_resolvconf
Data type: Boolean
Wether or not to use resolvconf
update_cmd
Data type: Optional[String]
Update command to load resolv.conf. Only needed on some OS
package
Data type: Optional[String]
Name of the package to install
manage_package
Data type: Boolean
Wether or not a package should be managed
package_ensure
Data type: String
Ensure the state of the managed package
domainname
Data type: Optional[String]
Local domain name
Default value: undef
searchpath
Data type: Variant[Array[String],String]
Search list for host-name lookup
Default value: []
options
Data type: Optional[Array]
Modify certain internal resolver variables
Default value: undef
mode
Data type: String
Config file mode
Default value: '0644'
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v8.0.1 (2025-10-27)
Merged pull requests:
v8.0.0 (2025-10-27)
Breaking changes:
Implemented enhancements:
v7.0.0 (2024-06-24)
Closed issues:
- new forge release which allows stdlib 9.x and puppet 8 #73
Merged pull requests:
v6.0.0 (2024-05-22)
Closed issues:
- new forge release which allows stdlib 8.6.0 #71
Merged pull requests:
- release: v6.0.0 #76 (saz)
- drop puppet6 support #75 (saz)
- Update to module template files #74 (saz)
- Allow puppet 8 and stdlib 9 #72 (deric)
v5.1.0 (2023-05-26)
Closed issues:
- Please update dependencies #69
- Request: allow puppetlabs-stdlib \<8.0.0 #65
- Support custom comment header #60
Merged pull requests:
- Update from modulesync_config #70 (saz)
- Allow stdlib v8 #68 (sazzle2611)
- Update from saz modulesync_config #67 (saz)
v5.0.0 (2021-06-22)
Closed issues:
- domainname and searchpath parameters are not mutually exclusive on RHEL #53
Merged pull requests:
v4.2.1 (2020-09-03)
Closed issues:
v4.2.0 (2020-09-03)
Closed issues:
Merged pull requests:
- Fix for options in Solaris 11 #63 (bonivart)
- Remove duplicates from the searchpath. #61 (vStone)
- allow puppetlabs/stdlib 6.x #58 (Dan33l)
- Update metadata to indicate Solaris compatibility #56 (gabe-sky)
v4.1.0 (2019-01-22)
Closed issues:
- accept puppetlabs-stdlib with version > 5 #55
- expects a value for parameter 'config_file' #54
- Error while evaluating a Resource Statement upon release of v4.0.0 #51
Merged pull requests:
v4.0.0 (2018-06-29)
Closed issues:
- New major release with puppet #47
- deprecation warnings #46
- Issues with Debian 9 and Ubuntu 16.04 ? #45
- Deprecation warning with latest Puppet #38
Merged pull requests:
- Use special template for Solaris 11 to make file resource idempotent #50 (motley74)
- fix rubocop obsolete configuration #49 (archii)
- Mode Parameterized #48 (RARYates)
- migrate to puppet4 validations #40 (bastelfreak)
v3.3.0 (2017-06-26)
Closed issues:
Merged pull requests:
- Make options be one-per-line not concatenated in one #41 (gabe-sky)
- Updated maninfests/params.pp to allow for AIX configuration. #39 (andersonericw)
- Fix warning for xenial #37 (elmobp)
v3.1.0 (2017-01-06)
Merged pull requests:
- Adding documentation head to avoid puppet-style warning #36 (Spreadcat)
- Make it work on solaris \< 10 #35 (brontitall)
- allow overriding config_file #34 (simonsd)
v3.0.5 (2015-03-29)
v3.0.4 (2015-03-29)
Closed issues:
- files/dnsmasq_local-dns doesn't appear to be used #30
- cut new forge release #28
- Unable to install on Centos 6.5 #27
- Can't clone into machine via vagrant #23
Merged pull requests:
v3.0.3 (2014-09-23)
v3.0.1 (2014-09-23)
v3.0.2 (2014-09-23)
Closed issues:
- Missing dependency #24
Merged pull requests:
- Issue #24 - Missing dependency #29 (myoung34)
- $searchpath and empty array #26 (lingfish)
- Error in the readme #25 (gerapeldoorn)
- Fix metadata to work on pe 3.3 #21 (adamcrews)
- update template to use correct variable name in domain line #20 (sethlyons)
- Foreman related bug fix #19 (szynaka)
v3.0.0 (2014-06-22)
Closed issues:
- domain and search parameters mutually exclusive #16
Merged pull requests:
v2.1.0 (2014-04-25)
Closed issues:
- spec tests #12
v2.0.0 (2014-01-23)
Closed issues:
- Forge release? #10
Merged pull requests:
v1.0.4 (2013-12-03)
Merged pull requests:
- access searchpath var as an instance var in erb template #11 (jhoblitt)
- Fix variable reference deprecation warning #9 (fadenb)
- Fully qualify 'domain' fact variable. #8 (trlinkin)
v1.0.3 (2012-12-20)
Merged pull requests:
v1.0.2 (2012-11-09)
Closed issues:
Merged pull requests:
v1.0.1 (2012-10-31)
Merged pull requests:
- Support the "options" configuration option. #3 (razorsedge)
- Add RedHat osfamily support. #2 (razorsedge)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>=4.12.0 < 10.0.0)
Copyright 2012 Steffen Zieger
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.