lib/vagrant-subutai/registration.rb in vagrant-subutai-7.0.7 vs lib/vagrant-subutai/registration.rb in vagrant-subutai-7.0.8
- old
+ new
@@ -58,20 +58,23 @@
end
end
end
end
- # Write peer ip address to genereted file if provider Hyper-V
- if SubutaiConfig.boolean?(:SUBUTAI_PEER) && SubutaiConfig.provider == :hyper_v
+ # Write peer ip address to genereted file if provider Hyper-V or Libvirt
+ if SubutaiConfig.boolean?(:SUBUTAI_PEER)
subutai_cli = Commands.new(ARGV, @machine.env)
ip = subutai_cli.info(Configs::VagrantCommand::ARG_IP_ADDR)
if ip.nil?
STDOUT.puts 'We can\'t detect your PeerOS ip address!'
exit
end
- SubutaiConfig.put(:_IP_HYPERV, ip, true) if is_ip?(ip)
+ if is_ip?(ip)
+ SubutaiConfig.put(:_IP_HYPERV, ip, true) # for support back compatibility (depricated)
+ SubutaiConfig.put(:_IP_PEER, ip, true)
+ end
end
end
# This is the method called when destroying a machine that allows
# for any state related to the machine created by the provisioner
\ No newline at end of file