Checklist
What You Are Seeing?
When using the force: true parameter with the chocolatey.chocolatey.win_chocolatey module it wraps the package name with "" and the install fails.
What is Expected?
I'd expect it to work with without adding "" same as without using the force: true parameter.
How Did You Get This To Happen?
I tried to use the following chocolatey.chocolatey.win_chocolatey module parameters to install packages:
- name: Installing software...
chocolatey.chocolatey.win_chocolatey:
name:
- 7zip
- firefox
state: present
force: true
System Details
- Operating System: 10.0.19045.0
- Windows PowerShell version: 5.1.19041.6456
- Chocolatey CLI Version: 2.4.3
- Chocolatey Licensed Extension version:
- Chocolatey License type:
- Terminal/Emulator: Windows PowerShell
Installed Packages
choco list:
Chocolatey v2.4.3
chocolatey 2.4.3
1 packages installed.
Output Log
The full error of the failed Ansible module command:
changed: false
choco_cli_version: 2.4.3
command: C:\ProgramData\chocolatey\bin\choco.exe install "7zip firefox" --fail-on-unfound
--yes --no-progress --limit-output --force --timeout 2700
msg: Error installing package(s) '7zip firefox'
rc: 1
stderr: ''
stderr_lines: <omitted>
stdout: |-
Installing the following packages:
7zip firefox
By installing, you accept licenses for the packages.
7zip firefox not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- 7zip firefox - 7zip firefox not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.
stdout_lines: <omitted>
Additional Context
When removing the "" around "7zip firefox" and trying the run the command manually it works. Also when removing the force: true flag from the module it works.
Checklist
What You Are Seeing?
When using the
force: trueparameter with thechocolatey.chocolatey.win_chocolateymodule it wraps the package name with "" and the install fails.What is Expected?
I'd expect it to work with without adding "" same as without using the
force: trueparameter.How Did You Get This To Happen?
I tried to use the following
chocolatey.chocolatey.win_chocolateymodule parameters to install packages:System Details
Installed Packages
Output Log
Additional Context
When removing the "" around
"7zip firefox"and trying the run the command manually it works. Also when removing theforce: trueflag from the module it works.