I'm new to Ansible and would appreciate practical advice for learning it effectively. Are there concepts, modules, workflows, or common mistakes I should focus on first?
3 Answers
Learn the standard modules instead of reaching for shell or command for every task. Modules are usually safer, clearer, and designed to describe the desired system state. Becoming familiar with them also helps you recognize when Ansible already has a built-in solution for something.
Start by understanding the differences between Ansible, Ansible Core, and the Python versions they support. Keeping those compatibility requirements in mind will save you trouble when installing roles, collections, and plugins. For more complex setups, you can even automate installing Python first and then select a compatible ansible-core version.
Make sure you understand when Ansible is the right tool for a task and when another approach would be more appropriate. Also spend some time learning error handling, including rescue and always blocks, so your playbooks can recover cleanly or perform necessary cleanup when something fails.

That makes sense. Idempotency is one of the main benefits of Ansible, so shell and command should generally be avoided unless there’s a good reason to use them. If you do use them, conditions such as when or creates can help prevent unnecessary repeated changes.