Hello Everyone,
I am trying to find a way to add a check where playbook will exit Immediately if incorrect sudo password is entered by a user. As of now, If incorrect password is entered ansible would execute the playbook and each host will through error on the screen as Incorrect sudo password. I am using -K option along with my ansible command to prompt for sudo password. (I cannot store the password anywhere on the server to validate).
FAILED! => {"msg": "Incorrect sudo password"}
Is there a way Ansible would not execute the playbook & not throw errors for each host as soon as it learns that the sudo password is Incorrect for one host and exit the playbook ?