From 3e1553684e93cd56093ffad0c95287f6ecbccb6f Mon Sep 17 00:00:00 2001 From: "siraj.yasin" Date: Tue, 9 Feb 2021 19:47:32 +0000 Subject: [PATCH] Added verbose to gate runner playbook * Add verbose to see little more details on each tasks of play * Added option to prettyprint verbose in stdout ANSIBLE_STDOUT_CALLBACK=debug * Updated the virsh cleanup sequence. The images(.img) within /var/lib/libvirt/images/ were not removed Change-Id: I0a52aa4ccca41e3f2258420eb2e1173137ca0d06 --- tools/deployment/clean.sh | 2 +- tools/gate/20_run_gate_runner.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/deployment/clean.sh b/tools/deployment/clean.sh index e780753ea..989ebb181 100755 --- a/tools/deployment/clean.sh +++ b/tools/deployment/clean.sh @@ -26,10 +26,10 @@ iso_list=$(sudo virsh vol-list --pool default | awk '{print $1}'| grep -i 'ubunt vm_list=$(sudo virsh list --all | grep -E $vm_types | awk '{print $2}') net_list=$(sudo virsh net-list --all | awk '{print $1}'| grep -i air) -for vm in $vm_list; do sudo virsh destroy $vm; sudo virsh undefine $vm --nvram --remove-all-storage; done for vol in $vol_list; do sudo virsh vol-delete $vol --pool airship; done for iso in $iso_list; do sudo virsh vol-delete $iso --pool default; done for net in $net_list; do sudo virsh net-destroy $net; sudo virsh net-undefine $net; done +for vm in $vm_list; do sudo virsh destroy $vm; sudo virsh undefine $vm --nvram --remove-all-storage; done # TODO (raliev) the following commands can be overwritten in this way once we have proper label on all related containers/images # docker rmi -f $(docker ls -q --all --filter "label=org.opencontainers.image.authors=airship-discuss@lists.airshipit.org, irc://#airshipit@freenode") diff --git a/tools/gate/20_run_gate_runner.sh b/tools/gate/20_run_gate_runner.sh index 03e861624..ee9b369a7 100755 --- a/tools/gate/20_run_gate_runner.sh +++ b/tools/gate/20_run_gate_runner.sh @@ -25,6 +25,6 @@ PLAYBOOK_CONFIG=${PLAYBOOK_CONFIG:-"${TMP_DIR}/config.yaml"} export AIRSHIPCTL_WS=${AIRSHIPCTL_WS:-$PWD} export AIRSHIP_CONFIG_PHASE_REPO_URL=${AIRSHIP_CONFIG_PHASE_REPO_URL:-$PWD} -sudo --preserve-env=AIRSHIPCTL_WS ansible-playbook -i "$ANSIBLE_HOSTS" \ +sudo --preserve-env=AIRSHIPCTL_WS ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i "$ANSIBLE_HOSTS" \ playbooks/airshipctl-gate-runner.yaml \ - -e @"$PLAYBOOK_CONFIG" + -e @"$PLAYBOOK_CONFIG" -v