chocolatey / chocolatey-ansible

The Chocolatey module collection for Ansible
GNU General Public License v3.0
47 stars 29 forks source link

NET Framework check still triggers/fails when installing Chocolatey using chocolateyDownloadUrl #136

Open ch0nx opened 10 months ago

ch0nx commented 10 months ago

Checklist

What You Are Seeing?

When using the 'chocolateyDownloadUrl' environment variable to target a specific chocolatey package (below 2.x in this case), the .NET framework check defined here still triggers since it isnt specifying an exact version.

However the bootstrap script from Chocolatey that is invoked by default will IGNORE the download url variable if the version is specified, so this check cannot be circumvented.

What is Expected?

Using the chocolateyDownloadUrl env variable should prevent the .NET check from triggering, since it implies a specific version is being targeted.

How Did You Get This To Happen?

  1. Install Chocolatey from a specific source using the following:
    - name: Install chocolatey from source
      chocolatey.chocolatey.win_chocolatey:
        name: chocolatey
        state: present
      environment:
        chocolateyDownloadUrl: "https://myvery.specialfeed.int/chocolatey.1.3.1.nupkg"

System Details

Installed Packages

No additional packages are being installed since this is the actual Chocolatey installation

Output Log

fatal: [default]: FAILED! => {"changed": false, "command": "", "msg": "Chocolatey 2.0.0 requires .NET Framework 4.8 or higher to be installed. Please install .NET Framework 4.8 or higher and try again, or specify a 1.x version of Chocolatey to install.", "rc": 0}

Additional Context

No response