This commit is contained in:
badideasforsale 2026-04-13 17:02:24 -07:00 committed by GitHub
commit 99b8963218
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -251,24 +251,18 @@ if [ ! -f installer/install/tpot.yml ] && [ ! -f tpot.yml ];
fi
# Check type of sudo access
if [ "$myANSIBLE_TAG" = "Debian" ];
# Debian 13 - sudo seems to apply stricter settings, we now ask for the become password
then
myANSIBLE_BECOME_OPTION="--become --ask-become-pass"
else
sudo -n true > /dev/null 2>&1
if [ $? -eq 1 ];
then
myANSIBLE_BECOME_OPTION="--ask-become-pass"
echo "### sudo not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### Ansible will ask for the BECOME password which is typically the password you sudo with."
echo "### sudo not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### Ansible will ask for the BECOME password which is typically the password you sudo with."
echo
else
myANSIBLE_BECOME_OPTION="--become"
echo "### sudo acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo "### sudo acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
echo
fi
fi
# Run Ansible Playbook
echo "### Now running T-Pot Ansible Installation Playbook ..."