Test whether DNS resolves a given hostname to the expected IPv4 address.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_ad_dns_a_record_matches

Purpose

Test whether DNS resolves a given hostname to the expected IPv4 address.

Arguments

  • $1: Fully qualified hostname to resolve.
  • $2: Expected IPv4 address.
  • $3: Optional: Optional DNS server used for the lookup.

Usage

  sgnd_ad_dns_a_record_matches "server.example.test" "192.0.2.10" "192.0.2.53"