Use the xen api host to get the proper http ip

This commit is contained in:
flx5 2021-09-30 15:15:20 +02:00
parent cd8e37013d
commit a67141b2b5

View File

@ -5,7 +5,6 @@ import (
"fmt"
"strings"
"github.com/hashicorp/packer-plugin-sdk/multistep"
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
)
@ -19,7 +18,7 @@ func (s *StepHTTPIPDiscover) Run(ctx context.Context, state multistep.StateBag)
ui := state.Get("ui").(packersdk.Ui)
// find local ip
envVar, err := ExecuteHostSSHCmd(state, "echo $SSH_CLIENT")
envVar, err := ExecuteApiHostSSHCmd(state, "echo $SSH_CLIENT")
if err != nil {
ui.Error(fmt.Sprintf("Error detecting local IP: %s", err))
return multistep.ActionHalt