mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-28 22:06:31 +00:00
Simplify deploy streaming by removing tail buffering
This commit is contained in:
3 files changed
+10
-41
No files matched your search
@@ -38,13 +38,11 @@ def _run_deploy(
|
||||
if passthrough:
|
||||
cmd.extend(passthrough)
|
||||
|
||||
# Live stream output for immediate visibility,
|
||||
# while keeping a tail buffer for post-failure printing.
|
||||
# Live stream output for immediate visibility.
|
||||
r = compose.exec(
|
||||
cmd,
|
||||
check=False,
|
||||
live=True,
|
||||
keep_lines=400,
|
||||
extra_env={
|
||||
# Force ANSI colors even when no TTY is allocated (CI default).
|
||||
"ANSIBLE_FORCE_COLOR": "1",
|
||||
@@ -53,13 +51,6 @@ def _run_deploy(
|
||||
},
|
||||
)
|
||||
|
||||
if r.returncode != 0:
|
||||
print("===== deploy stdout (tail) =====")
|
||||
print((r.stdout or "").rstrip() or "<empty>")
|
||||
print("===== deploy stderr (tail) =====")
|
||||
print((r.stderr or "").rstrip() or "<empty>")
|
||||
print("===============================")
|
||||
|
||||
return int(r.returncode)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user