Created
February 21, 2018 10:59
-
-
Save evilr00t/5fc46ef54f4d63619d66f87217dafa50 to your computer and use it in GitHub Desktop.
ansible with sudo password - shortcut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apb() | |
{ | |
if [ ! -z "$ANSIBLE_BECOME_PASS" ]; then | |
ansible-playbook -e "ansible_become_pass=$ANSIBLE_BECOME_PASS" $@ | |
else | |
echo "[I] Did you forget about: " | |
echo -e "\e[31mexport ANSIBLE_BECOME_PASS=XXX\e[0m" | |
echo "[I] Oh, yes... you do!" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment