Today's topic was Ansible — one of the most common tools that comes up in DevOps interviews and real jobs. I practiced everything on 2 EC2 machines: one acts as the "control machine" (where Ansible is installed and commands are run from), and the other is the "target machine" (the one Ansible actually manages).
I'm writing this down step by step, in the same order I actually did it, along with the real errors I hit and what they meant — so future-me (and anyone else reading this before an interview) doesn't get confused by the same things.
Part 1: Setting up passwordless SSH login into the target EC2
Before Ansible can manage a remote server, it needs to be able to SSH into it without asking for a password every single time .…