mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-07 18:05:09 +00:00
CLI: Fix playbook output freeze by removing capture_output
The deploy wrapper previously used subprocess.run(..., capture_output=True), which buffered all Ansible output until the playbook finished. This made the CLI appear stuck at 'Launching Ansible Playbook…'. Switching to subprocess.run(cmd) restores live streaming of Ansible output. Details: https://chatgpt.com/share/693008b4-b7b0-800f-bd35-5a307a76fc59
This commit is contained in:
@@ -120,12 +120,7 @@ def run_ansible_playbook(
|
||||
|
||||
print("\n🚀 Launching Ansible Playbook...\n")
|
||||
# Capture output so the real Ansible error is visible before exit
|
||||
result = subprocess.run(cmd, text=True, capture_output=True)
|
||||
|
||||
if result.stdout:
|
||||
print(result.stdout, end="")
|
||||
if result.stderr:
|
||||
print(result.stderr, file=sys.stderr, end="")
|
||||
result = subprocess.run(cmd)
|
||||
|
||||
if result.returncode != 0:
|
||||
print(
|
||||
|
||||
Reference in New Issue
Block a user