Closed jaysoffian closed 2 years ago
Tentative fix:
diff --git i/pyinfra/api/facts.py w/pyinfra/api/facts.py
index debdfb5862..2e2822fa34 100644
--- i/pyinfra/api/facts.py
+++ w/pyinfra/api/facts.py
@@ -219,6 +219,7 @@ def _get_fact(
status = False
stdout = []
+ combined_output_lines = []
try:
status, combined_output_lines = host.run_shell_command(
(I'm not clear why specifying config.USE_SUDO_PASSWORD
has anything to do with the issue.)
Describe the bug
To Reproduce
See above.
Expected behavior
Not to crash.
Meta
pyinfra --support
. See above.-vv
and--debug
.I'm not seeing anything additionally useful when running with
-vv
and--debug
.However, the problem only occurs when I specify a password via
config.USE_SUDO_PASSWORD = "..."
inconfig.py
AND when my inventory includes at least one host that has an SSH error.The problem goes away either by removing the troublesome host from the inventory or by not using
config.USE_SUDO_PASSWORD
. The inventory consists of 66-70 hosts.