Closed Windos closed 1 year ago
Note that the pipeline testing won't test this as the VM used for that is a Windows 10 version that has .NET Framework 4.8 already installed. If we wanted to include testing for this we would need to spin up an older VM to test against in addition.
Can we spin up that older VM and make sure we're testing it.
Note that the pipeline testing won't test this as the VM used for that is a Windows 10 version that has .NET Framework 4.8 already installed. If we wanted to include testing for this we would need to spin up an older VM to test against in addition.
Can we spin up that older VM and make sure we're testing it.
@pauby will do, will mark this as draft until that is added.
This now has tests and docs and is ready for review, though I'm still watching the Azure pipeline.
@vexx32
I'm wondering if we can construct this pipeline such that both VMs are created and destroyed in parallel, rather than separately.
I was wondering about this too and ummed and arred around it for a while. My biggest concern was I wasn't sure off hand if I'd end up with the Windows Server VM running for ~2 hours when the test being run on it only takes ~10 minutes. Ended up going the "easier" route to minimize the amount of time that VM was running and incurring costs.
Maybe we add an issue to come back to to optimize the pipeline? We could go as far as spinning up a handful of Windows 10 VMs and running each of the Ansible version tests in parallel too... would take the entire runtime down to 30-40 minutes but is a bit of re-work to the pipeline.
Yeah that's probably a good idea for us to do in future at least. Agreed.
Description Of Changes
This PR tests to see what version of Chocolatey CLI is being installed and will fail the task if the version being installed has an unmet dependency.
Motivation and Context
With the release of Chocolatey CLI 2.0.0, there is now a dependency on having .NET Framework 4.8 installed. The win_chocolatey module installs the latest version of Chocolatey CLI by default and in the currently released version of the collection it is the Chocolatey install itself that fails with a complaint about .NET Framework not being present.
This change performs the dependency check on the "Ansible" side of things, giving more control of the task failure and the message returned to the end user.
Testing
I have built and tested this change locally against a Windows Server 2016 VM.
When no version is specified, and .NET Framework 4.8 isn't installed, the task fails as expected.
When a version (e.g. 1.4) is specified, it installs as the dependency does not apply.
When .NET Framework 4.8 is already installed, Chocolatey CLI 2.0.0 can be installed.
Note that the pipeline testing won't test this as the VM used for that is a Windows 10 version that has .NET Framework 4.8 already installed. If we wanted to include testing for this we would need to spin up an older VM to test against in addition.
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
Fixes #120