Forge Home

dnsquery

Query functions for DNS

298,065 downloads

137,591 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
This module has been deprecated by its author since Jun 26th 2023.

The author has suggested puppet-dnsquery as its replacement.

Start using this module

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.