pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
System: Windows
Platform: Windows-10-10.0.22621-SP0
Release: 10
Machine: AMD64
pyinfra: v2.8
Executable: ...\.venv\Scripts\pyinfra.exe
Python: 3.8.10 (CPython, MSC v.1928 64 bit (AMD64))
How was pyinfra installed (source/pip)?
venv+ pip
Include pyinfra-debug.log (if one was created)
Consider including output with -vv and --debug.
--> Preparing Operations...
[pyinfra\api\operation] Adding operation, {'Choco/Packages'}, opOrder=(0, 36), opHash=c3a491381f47e26d8549af68b2c1c00373cd9671
[pyinfra\api\facts] Getting fact: choco.ChocoPackages () (ensure_hosts: None)
[pyinfra\connectors\ssh] Running command on x.x.x.x: (pty=None) choco list --local-only
[x.x.x.x] >>> choco list --local-only
[pyinfra\connectors\ssh] Waiting for exit status...
[pyinfra\connectors\ssh] Command exit status: 1
[x.x.x.x] Chocolatey v2.2.2
[x.x.x.x] Invalid argument --local-only. This argument has been removed from the list command and cannot be used.
[x.x.x.x] Error: could not load fact: choco.ChocoPackages
Describe the bug
With Chocolatey 2.0.0 (May 31, 2023), there was a breaking change: Change behavior of choco list to be local only - see #158.
Issue in pyinfra/facts/choco.py - ChocoPackages:
To Reproduce
Steps to reproduce the behavior, please include where possible:
Operation code & usage
Target system information
Example using the
@docker
connector (helps isolate the problem)Expected behavior
No more use
--local-only
option:With output:
Meta
Include output of
pyinfra --support
.How was pyinfra installed (source/pip)?
venv
+pip
Include pyinfra-debug.log (if one was created)
Consider including output with
-vv
and--debug
.