Interview Prep/Ansible/Ad-hoc Commands, Modules and Idempotency

What does `ansible all -m ping` actually test?

BeginnerConceptAd-hoc Commands, Modules and Idempotency
Answer

It is not an ICMP ping. The ping module logs in over SSH, runs a tiny Python module on the target, and returns pong. A SUCCESS therefore proves four things: network reachability, SSH authentication, a working Python interpreter, and that a temp directory can be written.

An UNREACHABLE! points to network/SSH/auth, while a module failure with "interpreter not found" points to Python.

All Ansible questions Roadmap: Ansible

More on Ad-hoc Commands, Modules and Idempotency