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
This commit is contained in:
siraj.yasin 2021-02-09 19:47:32 +00:00 committed by Sirajudeen
parent 77268cd1d0
commit 3e1553684e
2 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

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