fix up typos in comments and regenerate docs.
Co-authored-by: Wilken Rivera <dev@wilkenrivera.com>
This commit is contained in:
parent
4178625afb
commit
a07563c64f
|
@ -179,7 +179,7 @@ type WinRM struct {
|
|||
// [`ssh_interface`](/docs/builders/amazon-ebs#ssh_interface)
|
||||
WinRMHost string `mapstructure:"winrm_host"`
|
||||
// Setting this to `true` adds the remote
|
||||
// `host:post` to the `NO_PROXY` environment variable. This has the effect of
|
||||
// `host:port` to the `NO_PROXY` environment variable. This has the effect of
|
||||
// bypassing any configured proxies when connecting to the remote host.
|
||||
// Default to `false`.
|
||||
WinRMNoProxy bool `mapstructure:"winrm_no_proxy"`
|
||||
|
|
|
@ -205,11 +205,6 @@ func (s *StepConnectWinRM) waitForWinRM(state multistep.StateBag, ctx context.Co
|
|||
func setNoProxy(host string, port int) error {
|
||||
current := os.Getenv("NO_PROXY")
|
||||
p := fmt.Sprintf("%s:%d", host, port)
|
||||
// not set
|
||||
// set
|
||||
// is set and not contains
|
||||
// set
|
||||
// is set and contains
|
||||
if current == "" {
|
||||
return os.Setenv("NO_PROXY", p)
|
||||
}
|
||||
|
@ -233,7 +228,12 @@ func envProxyFunc() func(*url.URL) (*url.URL, error) {
|
|||
return envProxyFuncValue
|
||||
}
|
||||
|
||||
// c.WinRMTransportDecorator = func() winrm.Transporter { return &winrm.ClientNTLM{} }
|
||||
// ProxyTransportDecorator is a custom Transporter that reloads HTTP Proxy settings at client runtime.
|
||||
// The net/http ProxyFromEnvironment only loads the environment once, when the
|
||||
// code is initialized rather than when it's executed. This means that if your
|
||||
// wrapping code sets the NO_PROXY env var (as Packer does!), it will be
|
||||
// ignored. Re-loading the environment vars is more expensive, but it is the
|
||||
// easiest way to work around this limitation.
|
||||
func ProxyTransportDecorator() winrmcmd.Transporter {
|
||||
return winrmcmd.NewClientWithProxyFunc(RefreshProxyFromEnvironment)
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
[`ssh_interface`](/docs/builders/amazon-ebs#ssh_interface)
|
||||
|
||||
- `winrm_no_proxy` (bool) - Setting this to `true` adds the remote
|
||||
`host:post` to the `NO_PROXY` environment variable. This has the effect of
|
||||
`host:port` to the `NO_PROXY` environment variable. This has the effect of
|
||||
bypassing any configured proxies when connecting to the remote host.
|
||||
Default to `false`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue