(#176) Pass through choco_args on uninstall#190
Open
Windos wants to merge 2 commits intochocolatey:masterfrom
Open
(#176) Pass through choco_args on uninstall#190Windos wants to merge 2 commits intochocolatey:masterfrom
Windos wants to merge 2 commits intochocolatey:masterfrom
Conversation
Currently, when using the force flag on the win_chocolatey command the list of packages is being added to the collection of missing packages as a single string. This results in the packages being passed to choco.exe bounded by quote character (e.g. `"package1 package2"`) and so this is being interpreted as a single (incorrect) package name. This change iterates over the list of packages and adds them individually. Additionally, tests have been added to cover this failure case.
choco_args enables the user to pass additional parameters to choco.exe, however this was not being passed through on uninstalls (state: absent). This change enables that passthrough on uninstalls, and also adds a test to ensure that this is the case.
Member
Author
|
This has been branched off of #188 as the tests needed to have a package already installed in order for the uninstall to actually be attempted and that PR adds a force install to the end which reliably makes that the case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description Of Changes
This PR enables the user to pass through additional parameters to choco.exe when uninstalling a package.
Motivation and Context
Certain features of choco.exe aren't exposed directly via the modules this Ansible collection and
choco_argsis a method for passing in additional flags when that is the case. It is currently, however, not setup to do so when state is set to absent (i.e. choco uninstall).By changing this, it enables users to pass through options like
--skipautouninstallerwhen uninstalling a package.Testing
Operating Systems Testing
N/A
Change Types Made
Change Checklist
Related Issue
Fixes #176