You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/builder/oneandone/ssh.go

20 lines
381 B

package oneandone
import (
"log"
"github.com/hashicorp/packer/helper/multistep"
)
func commHost(host string) func(multistep.StateBag) (string, error) {
return func(state multistep.StateBag) (string, error) {
if host != "" {
log.Printf("Using ssh_host value: %s", host)
return host, nil
}
ipAddress := state.Get("server_ip").(string)
return ipAddress, nil
}
}