MaKaNu
MaKaNu

Reputation: 1008

Set bootstrap choco install script

What is the right approach for installing a choco package via proxy repository?

So my general approach was the following:

- name: Install virtualbox
      chocolatey.chocolatey.win_chocolatey:
        name: virtualbox
        version: "7.0.18"
        source: http://my-nexus.myorg.org:8081/repository/choco-group/
        state: present

This always failed because of the missing bootstrap script on my nexus instance.

Adding just the following works:

bootstrap_script: https://community.chocolatey.org/install.ps1

But maybe this could also trigger the rate limiter of community.chocolatey.org?

I think having the file in my ansible pool repo is also not a solution, since I need to track the status of the script.

So I think for my scenario having the script at the right location on the proxy sound good.

If I am right how to achieve that behavior?

The examples seems to just point against some simple internal web server.

Upvotes: 0

Views: 80

Answers (1)

pauby
pauby

Reputation: 787

This always failed because of the missing bootstrap script on my nexus instance. But maybe this could also trigger the rate limiter of community.chocolatey.org?

Perhaps. See the documentation on rate limiting to determine if you're likely to breach the limits.

So I think for my scenario having the script at the right location on the proxy sound good. If I am right how to achieve that behavior?

A proxy is where you are using, in this case, https://community.chocolatey.org/api/v2 as an upstream of your own repository. So the repository you are using, http://my-nexus.myorg.org:8081/repository/choco-group/, is a NuGet v2 repository. You can't put a script in there. You need to create a separate repository (Raw in this case) and host the script there.

Chocolatey has a Discord server that you would likely get more timely help from.

Upvotes: 1

Related Questions