2019-01-11 17:06:15 -05:00
|
|
|
package vagrant
|
|
|
|
|
|
|
|
import (
|
2020-11-17 19:31:03 -05:00
|
|
|
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
|
2019-01-11 17:06:15 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
func CommHost() func(multistep.StateBag) (string, error) {
|
|
|
|
return func(state multistep.StateBag) (string, error) {
|
|
|
|
config := state.Get("config").(*Config)
|
|
|
|
return config.Comm.SSHHost, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func SSHPort() func(multistep.StateBag) (int, error) {
|
|
|
|
return func(state multistep.StateBag) (int, error) {
|
|
|
|
config := state.Get("config").(*Config)
|
|
|
|
return config.Comm.SSHPort, nil
|
|
|
|
}
|
|
|
|
}
|