Add error handler for install script

This commit is contained in:
Salt 2020-09-02 18:03:41 -05:00
parent f963f1866c
commit 5df58a3b5d

View File

@ -15,6 +15,9 @@ if ! command -v ansible > /dev/null 2>&1; then
elif command -v apk > /dev/null 2>&1; then elif command -v apk > /dev/null 2>&1; then
printf "Installing via APK\n" printf "Installing via APK\n"
sudo apk add py3-pip py3-setuptools sudo apk add py3-pip py3-setuptools
else
printf "No supported package manager found\nPlease install Ansible manually"
exit 1
fi fi
sudo pip3 install ansible sudo pip3 install ansible
fi fi