Forge Home

resolvconf

Module for managing resolv.conf on Debian & RedHat based systems

9,427 downloads

1,410 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.0 (latest)
  • 0.1.0
released Nov 19th 2020
This version is compatible with:
  • Puppet Enterprise 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.4.x
  • Puppet >= 4.9.0 < 7.0.0
  • , , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'suchpuppet-resolvconf', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add suchpuppet-resolvconf
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install suchpuppet-resolvconf --version 1.0.0

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

Documentation

suchpuppet/resolvconf — version 1.0.0 Nov 19th 2020

resolvconf

Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with resolvconf
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

Module for managing resolv.conf on RedHat and Debian based systems

Setup

Beginning with resolvconf

include resolvconf is enough to get you up and running with the module if you would like a default setup using Google’s resolvers and the $::domain fact as the search domain.

Usage

All parameters are available in the main resolvconf class. See the common usages below for examples.

Configure a default resolv.conf with Google nameservers as the $::domain fact as the search path

include ::resolvconf

Pass in parameters for which nameservers to use

class { ‘::resolvconf’:
  nameservers => [‘8.8.8.8’, ‘8.8.4.4’],
}

Pass in nameservers plus domains for the search path

class { ‘::resolvconf’:
  nameservers => [‘8.8.8.8’, ‘8.8.4.4’],
  domains     => [‘domain.tld’, ‘sub.domain.tld’],
}

Reference

Classes

Public classes

  • resolvconf: Main class, includes all other classes

Private classes

  • resolvconf::config: Handles the configuration of resolv.conf
  • resolvconf::service: Handles the resolvconf service for debian based systems
  • resolvconf::install: Handles package installation for debian based systems

Parameters

nameservers

Optional.

Data type: Array

Allows you to specify an array of nameservers to use in resolv.conf. Default value: [‘8.8.8.8’, ‘8.8.4.4’]

domains

Optional.

Data type: Array

Allows you to specify an array of domains to include in the search path in resolv.conf. Default value: [$::domain]

use_local

Optional.

Data type: Boolean

Allows you to use a local nameserver such as named/bind. Will set a nameserver entry of 127.0.0.1 as the first entry in resolv.conf. Default value: false

Limitations

This module has only been tested on the following distros:

  • Ubuntu
    • Trusty
    • Xenial
  • Debian
    • Jessie
    • Stretch
  • CentOS 7

This module uses a custom Hiera 5 backend and requires at least Puppet 4.9 due to this.

Development

If you would like to contribute to the module, fork it and create a pull request when you're satisfied with your changes.