packer-cn/builder/virtualbox/common/ssh.go

17 lines
356 B
Go
Raw Normal View History

2013-12-22 12:08:09 -05:00
package common
import (
"github.com/hashicorp/packer/helper/multistep"
2013-12-22 12:08:09 -05:00
)
func CommHost(host string) func(multistep.StateBag) (string, error) {
return func(state multistep.StateBag) (string, error) {
return host, nil
}
}
func SSHPort(state multistep.StateBag) (int, error) {
sshHostPort := state.Get("sshHostPort").(int)
2017-03-28 21:47:10 -04:00
return sshHostPort, nil
2013-12-22 12:08:09 -05:00
}