-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_chocolatey: ChocolateyInstall.ps1 from Internal Repositories fails (Sonatype Nexus) #18
Comments
win_chocolatey
: ChocolateyInstall.ps1 from Internal Repositories fails (Sonatype Nexus)
I know that we have folks use a different url for this - https://chocolatey.org/install#ansible chocolatey-ansible/chocolatey/plugins/modules/win_chocolatey.ps1 Lines 250 to 263 in a5b9a10
If you pass the full source being to the URL it should use that as seen at https://chocolatey.org/install#ansible:
|
Line 252/253 there are what I'm mentioning. |
Nevermind - chocolatey-ansible/chocolatey/plugins/modules/win_chocolatey.ps1 Lines 213 to 221 in a5b9a10
|
Yeah, explicit/direct file URL would be best. I don't see anything necessarily wrong with attempting a few common patterns if we just have the base url though. |
The issue stems from us seeing this fall over in person where a direct URL to a ps1 file fell over and returned the base url appended by |
If I had to guess, I'd guess that |
If someone had a task
Then it should be using that URL to get that script and install Chocolatey. The workflow of bootstrapping code followed this process
So the scenario that was given by @adilio should work right now without any changes. |
Just for more clarity, this ends failing on chocolatey-ansible/chocolatey/plugins/modules/win_chocolatey.ps1 Lines 310 to 312 in a5b9a10
|
We are watching this miss the section on installation at chocolatey-ansible/chocolatey/plugins/modules/win_chocolatey.ps1 Lines 281 to 291 in a5b9a10
Check mode is not on, but it never runs this section. It's kind of perplexing on our end, hopefully we'll have more details on this soon. |
This is definitely a weird one based on the output shared we can see that You can set |
I have since tested this install method, @vexx32, and can confirm it now works as expected. I'll go ahead and close this issue. Appreciate your efforts! |
Myself and @steviecoaster have just worked through this with a customer setting up C4B and an organizational installation hosted on Sonatype Nexus. The "raw" repository hosting the offline install script for Chocolatey itself is at a URL similar to:
http://localhost:8081/repository/choco-install/install.ps1
The
win_chocolatey
module uses the Chocolatey (Simple) Server approach of only looking in the root URL for aninstall.ps1
script. This is not the pattern in other repository management applications like Sonatype Nexus or JFrog Artifactory.We need to build some conditional logic into this statement, to handle these additional use cases for our C4B customers:
chocolatey-ansible/chocolatey/plugins/modules/win_chocolatey.ps1
Lines 250 to 263 in a5b9a10
The text was updated successfully, but these errors were encountered: