#-------------------------------------------------------------------------------
if [ "$OS_ID" == "ubuntu" ]; then
- apt update
+ sudo apt update -y
ansible --version
RESULT=$?
if [ $RESULT -ne 0 ]; then
elif [ "$OS_ID" == "centos" ]; then
- yum update
+ sudo yum update -y
ansible --version
RESULT=$?
if [ $RESULT -ne 0 ]; then