lib/kitchen/provisioner/finder/winrm.rb in kitchen-nodes-0.6.6 vs lib/kitchen/provisioner/finder/winrm.rb in kitchen-nodes-0.7.0
- old
+ new
@@ -21,14 +21,14 @@
@connection = connection
end
def find_ips
out = @connection.node_execute(
- 'Get-NetIPConfiguration | % { $_.ipv4address.IPAddress }')
+ '(ipconfig) -match \'IPv[46] Address\'')
data = []
out[:data].each do |out_data|
stdout = out_data[:stdout]
- data << stdout.chomp unless stdout.nil? || stdout.chomp.empty?
+ data << Regexp.last_match[1] if stdout.chomp =~ /:\s*(\S+)/
end
data
end
def find_fqdn