Running Ansible in check mode
Ansible provides an option called check mode. In check mode (or dry-run), Ansible provides the user a way to validate the execution of a task without executing it. Thus, the task will be executed as a simulation. No changes will be made by the module; instead, a report is provided that shows what would be done. Furthermore, combined with the diff mode, with the addition of --diff, it provides further details on what will happen beyond just a summary line. However, not all modules support check and diff modes, but the ones that do offer the ability to validate changes before deploying them can be really useful.
One way to determine whether a module supports check mode is by looking at the module documentation. You can do this using the Ansible Galaxy portal, or alternatively, by using the command-line tooling, ansible-doc, that comes natively with Ansible (and the collections installed). For example, from the command line, you can run the following...