Respect static ip configuration

This commit is contained in:
flx5 2021-09-28 11:15:16 +02:00
parent ade8d0d819
commit 3cb985d134

View File

@ -20,6 +20,12 @@ func (self *StepWaitForIP) Run(ctx context.Context, state multistep.StateBag) mu
c := state.Get("client").(*Connection)
config := state.Get("commonconfig").(CommonConfig)
// Respect static configuration
if config.Comm.Host() != "" {
state.Put("instance_ssh_address", config.Comm.Host())
return multistep.ActionContinue
}
ui.Say("Step: Wait for VM's IP to become known to us.")
uuid := state.Get("instance_uuid").(string)