mirror of
https://github.com/telekom-security/tpotce.git
synced 2026-05-14 10:06:53 +00:00
Merge 796642d7e0 into e7b42bd91d
This commit is contained in:
commit
99b8963218
1 changed files with 9 additions and 15 deletions
16
install.sh
16
install.sh
|
|
@ -251,23 +251,17 @@ if [ ! -f installer/install/tpot.yml ] && [ ! -f tpot.yml ];
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check type of sudo access
|
# Check type of sudo access
|
||||||
if [ "$myANSIBLE_TAG" = "Debian" ];
|
sudo -n true > /dev/null 2>&1
|
||||||
# Debian 13 - sudo seems to apply stricter settings, we now ask for the become password
|
if [ $? -eq 1 ];
|
||||||
then
|
|
||||||
myANSIBLE_BECOME_OPTION="--become --ask-become-pass"
|
|
||||||
else
|
|
||||||
sudo -n true > /dev/null 2>&1
|
|
||||||
if [ $? -eq 1 ];
|
|
||||||
then
|
then
|
||||||
myANSIBLE_BECOME_OPTION="--ask-become-pass"
|
myANSIBLE_BECOME_OPTION="--ask-become-pass"
|
||||||
echo "### ‘sudo‘ not acquired, setting ansible become option to ${myANSIBLE_BECOME_OPTION}."
|
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 "### Ansible will ask for the ‘BECOME password’ which is typically the password you ‘sudo’ with."
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
myANSIBLE_BECOME_OPTION="--become"
|
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
|
echo
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run Ansible Playbook
|
# Run Ansible Playbook
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue