Method: Specinfra::Command::Openbsd::Base::Host.get_ipv4_address
- Defined in:
- lib/specinfra/command/openbsd/base/host.rb
permalink .get_ipv4_address(name) ⇒ Object
[View source]
8 9 10 11 |
# File 'lib/specinfra/command/openbsd/base/host.rb', line 8 def get_ipv4_address(name) # May return multiple values pick the one matching ipv4 "getent hosts #{escape(name)} | awk '$1 ~ /^[0-9.]+$/ {print $1}'" end |