Method: Specinfra::Command::Openbsd::Base::Host.get_ipv6_address

Defined in:
lib/specinfra/command/openbsd/base/host.rb

.get_ipv6_address(name) ⇒ Object

[View source]

12
13
14
15
# File 'lib/specinfra/command/openbsd/base/host.rb', line 12

def get_ipv6_address(name)
  # May return multiple values pick the one matching ipv6
  "getent hosts #{escape(name)} | awk 'tolower($1) ~ /^[0-9a-f:]+$/ {print $1}'"
end