I need to run automation against many hosts. Some use login “A”, some use login “B”. Passwords are the same.
-
How can I get ansible to try a secondary login based on login failure?
-
I’ve written a playbook to try multiple logins, and set ansible_user according to success or failure, but it stops at the first authentication failure. I excute an innocuous command to verify ability to sudo to root to verify success. I Need it to continue after the initial authentication failure. Note that the first llogin actually works, but it all craps out after being unable to authenticate.
Below is my script, and execution output follows: