This document provides best practices for using Ansible including:
- Break projects into common basics, specific configurations, non-standard software, and ad-hoc scripts.
- Reduce scope so each piece works within its own domain without touching unrelated areas.
- Name things properly to increase understandability.
- Use Ansible lint to catch errors and improve code quality.
- Use shell and command modules carefully and ensure idempotency or ability to detect changes.
- Maintain staging environments that closely mimic production to test changes.