diff --git a/builder/xenserver/common/step_wait_for_ip.go b/builder/xenserver/common/step_wait_for_ip.go index 52720948..bed9735b 100644 --- a/builder/xenserver/common/step_wait_for_ip.go +++ b/builder/xenserver/common/step_wait_for_ip.go @@ -60,7 +60,8 @@ func (self *StepWaitForIP) Run(ctx context.Context, state multistep.StateBag) mu return false, err } networks := metrics.Networks - if ip, ok := networks["0/ip"]; ok { + var ok bool + if ip, ok = networks["0/ip"]; ok { if ip != "" { ui.Message(fmt.Sprintf("Got IP '%s' from XenServer tools", ip)) return true, nil