From: sharath reddy Date: Wed, 25 May 2022 10:37:43 +0000 (+0530) Subject: add sudo X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=kuberef.git;a=commitdiff_plain;h=f845220cd17f89c8e1c68aecb3f0c7e82a56aa03 add sudo Issue-ID: KUB-64 Signed-off-by: sharath reddy Change-Id: If7b5b20a46881fb06e873f3fd8d4427dad7bdb91 Signed-off-by: sharath reddy Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/73388 Tested-by: jenkins-ci Reviewed-by: Dan Xu Reviewed-by: Michael Pedersen Reviewed-by: Georg Kunz Reviewed-by: Kanagaraj Manickam --- diff --git a/functions.sh b/functions.sh index 63f1490..4eaa281 100755 --- a/functions.sh +++ b/functions.sh @@ -69,7 +69,7 @@ check_prerequisites() { #------------------------------------------------------------------------------- if [ "$OS_ID" == "ubuntu" ]; then - apt update + sudo apt update -y ansible --version RESULT=$? if [ $RESULT -ne 0 ]; then @@ -109,7 +109,7 @@ check_prerequisites() { elif [ "$OS_ID" == "centos" ]; then - yum update + sudo yum update -y ansible --version RESULT=$? if [ $RESULT -ne 0 ]; then