Kill sudo once we don't need it anymore

Calling "sudo -k" ensures we don't let dangling sudo session in the
current shell.

Change-Id: Ibe324afe2d251f5b71dedc02230bbcfa13888996
This commit is contained in:
Cédric Jeanneret 2020-11-03 14:54:31 +01:00
parent 0f6aae588c
commit 3a796fc328
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ fi
# Display list of installed packages with versions (debugging failures)
"${HOME}/test-python/bin/pip" freeze
# Ensure we don't keep any dangling sudo session in the shell
sudo -k
# Run local test
PS1="[\u@\h \W]\$" source "${HOME}/test-python/bin/activate"
source "${PROJECT_DIR}/ansible-test-env.rc"