-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_chocolately (and other modules) fails with 'Cannot process argument transformation on parameter 'ChocoCommand'' #130
Comments
I have also encountered this issue in our development environment (still working fine in the production environment).
Running this via Ansible Automation Platform |
Sorted out our issue -- our error was slightly different Cannot index into a null array.
At line:122 char:17
$chocoCommand = Install-Chocolatey @installParams Root cause: instead of allowing the My quick solution was to simply add a |
We are also experiencing this. |
Even after my work arounds, I keep coming back to this line (albeit a slightly different version of the module). My question - why are we "installing" chocolatey right out of the gate with this module instead of just checking to see if its present? Am I misreading how this module works?
Install-Chocolatey defined:
|
By my read, the first few lines of
FWIW, though I've not seen the script you're using, if you end it by copying the Chocolatey nupkg you used to install into the correct folder within the
|
The error encountered here actually looks identical to the one from #147, I wonder if these two issues are related in some way. |
Checklist
What You Are Seeing?
This is on WSL on Windows, an initial install worked as expected, now I did something (possibly upgrade powershell to v5?) which broke win_chocolatey and other chocolatey modules completely. Note that
choco install vlc
for example on windows still succeeds. I see the same error on, for example,win_chocolatey_facts
.or
Inventory just links to the same windows host running WinRM. The above command gives me:
However, if I
become_user
system, it seems to fix the issue:outputs:
Either the error message in the first case is highly misleading, or something else fixes the issue when becoming system.
What is Expected?
Expecting the packages to be successfully installed.
How Did You Get This To Happen?
python3 -m pip install ansible && python3 -m pip install --upgrade ansible
win_ping
module works, butwin_chocolatey
,win_chocolatey_facts
etc. shows with the error aboveSystem Details
Installed Packages
Output Log
Additional Context
I tried this for various packages, like notepadplusplus, vlc, filezilla, nirlauncher and same issue. Like I mentioned, I did something that broke a previously working win_chocolatey.
Running Ansible on WSL (Windows Subsystem for Linux) on Windows.
The text was updated successfully, but these errors were encountered: