2013-12-22 09:08:09 -08:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
2018-01-19 16:18:44 -08:00
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
2013-12-22 09:08:09 -08:00
|
|
|
)
|
|
|
|
|
2016-08-24 09:30:26 -07:00
|
|
|
func CommHost(host string) func(multistep.StateBag) (string, error) {
|
|
|
|
return func(state multistep.StateBag) (string, error) {
|
|
|
|
return host, nil
|
|
|
|
}
|
2015-06-13 19:23:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func SSHPort(state multistep.StateBag) (int, error) {
|
2015-06-21 19:56:55 -07:00
|
|
|
sshHostPort := state.Get("sshHostPort").(int)
|
2017-03-28 18:47:10 -07:00
|
|
|
return sshHostPort, nil
|
2013-12-22 09:08:09 -08:00
|
|
|
}
|