Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Windows 2012 server with all internet access via proxy server (HTTP/s - no credentials required)
-
Windows
-
1
-
Windows 2018-12-19, 2018-12-26, Windows 2019-01-09
-
Needs Assessment
-
Needs Assessment
Description
Basic Info
Module Version: 3.0.0
Puppet Version: 2016.4.7
OS Name/Version: Windows 2012
Chocolatey fails to install when loaded with include chocolatey when proxy server required to access internet
Desired Behavior:
Chocolatey should install from behind a proxy server
Actual Behavior:
The puppet run fails and the entire script is dumped to the console. The causal error may be in the output but it could not be seen at first glance
Analysis
Chocolatey is installed by the module dynamically generating powershell script and evaluating it on the fly, along the lines of:
exec { "install chocolatey":
|
...
|
command => template("install_choclatey.ps1.erb"),
|
}
|
The script itself uses [System.Net.WebRequest] to perform downloads, so this would need to be programatically configured with the correct proxy for this to work, since windows has no concept of an overall proxy server for the 'system'. Although many applications use 'Internet Settings' as a placeholder for this, this technique is not available to us in puppet as the puppetlabs-registry module blocks access to the hkey_current_user hive. It's unclear whether writing the correct proxy setting here by some other means would resolve the issue.
The simplest resolution would be to pass the proxy to use to the module and have it be injected to the script somehow.
Steps to reproduce
1. Setup puppet master, install agent on machine behind proxy server
2. Install puppetlabs-chocolatey on puppet master
3. Have the agent classified with code that does include chocolatey
4. Observe permanent puppet run failures on client and chocolatey not installing correctly with a huge error message
User impact
Unable to use the module to install chocolatey when proxy servers in use - must either come up with alternative install method or not use chocolatey at all
Attachments
Issue Links
- mentioned in
-
Page Loading...