Commit 1e87e796 authored by Vasiliy Tolstov's avatar Vasiliy Tolstov

fix using private ip address in digitalocean builder

Signed-off-by: default avatarVasiliy Tolstov <v.tolstov@selfip.ru>
parent 80eb4c27
......@@ -262,8 +262,10 @@ func (d DigitalOceanClientV2) DropletStatus(id uint) (string, string, error) {
}
var ip string
if len(res.Droplet.Networks.V4) > 0 {
ip = res.Droplet.Networks.V4[0].IPAddr
for _, n := range res.Droplet.Networks.V4 {
if n.Type == "public" {
ip = n.IPAddr
}
}
return ip, res.Droplet.Status, err
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment