2020-02-07 04:38:48 -05:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Step to discover the http ip
|
|
|
|
// which guests use to reach the vm host
|
|
|
|
// To make sure the IP is set before boot command and http server steps
|
|
|
|
type StepHTTPIPDiscover struct{}
|
|
|
|
|
|
|
|
func (s *StepHTTPIPDiscover) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
|
2020-05-19 05:49:48 -04:00
|
|
|
state.Put("http_ip", "10.0.2.2")
|
2020-02-07 04:38:48 -05:00
|
|
|
|
|
|
|
return multistep.ActionContinue
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *StepHTTPIPDiscover) Cleanup(state multistep.StateBag) {}
|