Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 5 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tyler.engelhardt_8011
      last edited by stevedennis

      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 version ProGet 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.

      stevedennisS 1 Reply Last reply Reply Quote 0
      • stevedennisS Offline
        stevedennis inedo-engineer @tyler.engelhardt_8011
        last edited by

        Hi @tyler-engelhardt_8011 ,

        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.ps1

        I would try contacting the Ansiblesupport team or play around with the parameters like bootstrap_script. Please let us know what you find.

        Cheers,
        Steve

        1 Reply Last reply Reply Quote 0
        • T Offline
          tyler.engelhardt_8011
          last edited by tyler.engelhardt_8011

          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 the install.ps1 from the Chocolatey source upon request.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 1 / 1
          • First post
            Last post
          Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation