Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Chocolatey "install.ps1" not found
-
I set up a Chocolatey feed back last fall and tested it without issue. Let's say the url is
http://1.1.1.1/nuget/Chocolatey
.We're using Ansible to install software in our environment. So when I originally set up the feed, I used the feed URL above to perform installs with the Ansible module - https://docs.ansible.com/ansible/latest/collections/chocolatey/chocolatey/win_chocolatey_module.html
Recently, one of our engineers was trying to install software with the same feed. When passing that Chocolatey feed into Ansible, Ansible is unable to find the
install.ps1
file to install Chocolatey to be able to perform software installs. No one has touched the system since, so I'm not sure why the installer can't be found. We're on versionProGet 2022.9 Build 2 (Docker/ Linux)
From the Ansible docs linked here, this is how Ansible tries to find that file.
This value may also be used when Chocolatey is not installed as the location of the install.ps1 script if bootstrap_script is not set, and only supports URLs for this case. In this case, if the URL ends in “.ps1”, it is used as-is. Otherwise, if the URL appears to contain a “/repository/” fragment, the module will attempt to append “/install.ps1” to find an install script. If neither of these checks pass, the module will strip off the URL path and try to find an “/install.ps1” from the root of the server.
-
I looked at the docs briefly, but I'm really not familiar enough Ansible to know what could be the issue, or how they try to run Chocolatey behind-the-scenes. It's most certainly a configuration issue in your Ansible script though.
So far as I can tell, Chocolatey is not installed on the server, so Ansible is trying to look for a file called
install.ps1
on the ProGet server (which obviously wouldn't be there) to install Chocolatey. That file is located here: https://community.chocolatey.org/install.ps1I would try contacting the Ansiblesupport team or play around with the parameters like
bootstrap_script
. Please let us know what you find.Cheers,
Steve
-
It's odd because I haven't updated ProGet (or Ansible) since installing it, and it did work back 5 months ago.
You're right, I'll likely need to modify the
bootstrap_script
if ProGet is not pulling theinstall.ps1
from the Chocolatey source upon request.