Disable spinner when running validation in non quiet mode

When using the custom callback feature through the run CLI subcommand,
by passing --extra-env-vars ANSIBLE_STDOUT_CALLBACK=default, the spinner
makes the output a bit ugly.

This patch disables the spinner in non quiet mode.

Change-Id: I9f92894fe446f4881e0234b1577e49f9e7091b7b
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This commit is contained in:
Gael Chamoulaud (Strider) 2021-11-24 15:55:16 +01:00
parent 1b94c03ee7
commit ed33291a86
No known key found for this signature in database
GPG Key ID: 4119D0305C651D66
1 changed files with 1 additions and 1 deletions

View File

@ -434,7 +434,7 @@ class ValidationActions(object):
validation_uuid, artifacts_dir = v_utils.create_artifacts_dir(
log_path=log_path, prefix=os.path.basename(playbook))
run_ansible = v_ansible(validation_uuid)
if sys.__stdin__.isatty():
if sys.__stdin__.isatty() and quiet:
with Spinner():
_playbook, _rc, _status = run_ansible.run(
workdir=artifacts_dir,