add sudo
[kuberef.git] / functions.sh
index 63f1490..4eaa281 100755 (executable)
@@ -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