Forge Home

dnsquery

Query functions for DNS

276,252 downloads

119,090 latest version

4.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

  • 3.0.0 (latest)
  • 2.0.1
  • 2.0.0
  • 1.0.0
  • 0.1.1
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Mar 24th 2017

Start using this module

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

Add this module to your Puppetfile:

mod 'dalen-dnsquery', '3.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dalen-dnsquery
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dalen-dnsquery --version 3.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

dalen/dnsquery — version 3.0.0 Mar 24th 2017

DNS query functions

This module contains query functions for DNS for use from Puppet.

Usage

All functions can take a optional second lambda argument that is called if the lookup returned no values. Then the result of the lambda will be used instead.

dns_lookup

Does a DNS lookup and returns an array of addresses.

dns_a

Retrieves DNS A records and returns it as an array. Each record in the array will be a IPv4 address.

dns_aaaa

Retrieves DNS AAAA records and returns it as an array. Each record in the array will be a IPv6 address.

dns_cname

Retrieves a DNS CNAME record and returns it as a string.

dns_mx

Retrieves DNS MX records and returns it as an array. Each record in the array will be an array of hashes containing a preference & exchange key.

dns_ptr

Retrieves DNS PTR records and returns it as an array of strings.

dns_srv

Retrieves DNS SRV records and returns it as an array. Each record in the array will be an array of hashes containing a priority, weight, port and target key.

dns_txt

Retrieves DNS TXT records and returns it as an array. Each record in the array will be a array containing the strings of the TXT record.