commit
d1ce1f8114
|
@ -28,7 +28,7 @@ func ConnectFunc(network, addr string) func() (net.Conn, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// ConnectFunc is a convenience method for returning a function
|
||||
// ProxyConnectFunc is a convenience method for returning a function
|
||||
// that connects to a host using SOCKS5 proxy
|
||||
func ProxyConnectFunc(socksProxy string, socksAuth *proxy.Auth, network, addr string) func() (net.Conn, error) {
|
||||
return func() (net.Conn, error) {
|
||||
|
|
|
@ -111,7 +111,6 @@ type EnvVarsTemplate struct {
|
|||
|
||||
func (p *Provisioner) Prepare(raws ...interface{}) error {
|
||||
//Create passthrough for winrm password so we can fill it in once we know it
|
||||
log.Printf("MEGAN context is %#v", p.config.ctx)
|
||||
p.config.ctx.Data = &EnvVarsTemplate{
|
||||
WinRMPassword: `{{.WinRMPassword}}`,
|
||||
}
|
||||
|
@ -248,7 +247,6 @@ func extractScript(p *Provisioner) (string, error) {
|
|||
}
|
||||
|
||||
func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
||||
log.Printf("MEGAN context is %#v", p.config.ctx)
|
||||
ui.Say(fmt.Sprintf("Provisioning with Powershell..."))
|
||||
p.communicator = comm
|
||||
|
||||
|
@ -462,8 +460,8 @@ func (p *Provisioner) createCommandTextNonPrivileged() (command string, err erro
|
|||
func getWinRMPassword() string {
|
||||
winRMPass, _ := commonhelper.RetrieveSharedState("winrm_password")
|
||||
return winRMPass
|
||||
|
||||
}
|
||||
|
||||
func (p *Provisioner) createCommandTextPrivileged() (command string, err error) {
|
||||
// Prepare everything needed to enable the required env vars within the remote environment
|
||||
envVarPath, err := p.prepareEnvVars(true)
|
||||
|
|
Loading…
Reference in New Issue