Browse Source

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>
changes/20/819120/1
Gael Chamoulaud (Strider) 6 months ago
parent
commit
ed33291a86
No known key found for this signature in database
GPG Key ID: 4119D0305C651D66
  1. 2
      validations_libs/validation_actions.py

2
validations_libs/validation_actions.py

@ -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,

Loading…
Cancel
Save