instrumented to support 'check mode' (which contains most of the primary core modules, but it is not required that all modules do
this) will report what changes they would have made rather than making them. Other modules that do not support check mode will also take no action, but just will not report what changes they might have made.
Sometimes you may want to modify the check mode behavior of individual tasks. This is done via the ``check_mode`` option, which can
be added to tasks.
There are two options:
1. Force a task to **run in check mode**, even when the playbook is called **without**``--check``. This is called ``check_mode: yes``.
2. Force a task to **run in normal mode** and make changes to the system, even when the playbook is called **with**``--check``. This is called ``check_mode: no``.
..note:: Prior to version 2.2 only the the equivalent of ``check_mode: no`` existed. The notation for that was ``always_run: yes``.
Instead of ``yes``/``no`` you can use a Jinja2 expression, just like the ``when`` clause.
The ``--diff`` option to ansible-playbook works great with ``--check`` (detailed above) but can also be used by itself.
When this flag is supplied and the modules supports this, Ansible will report back the changes made or, if used with ``--check``, the changes that would have been made.
This is mostly used in modules that manipulate files (i.e. template) but other modules might also show 'before and after' information (i.e. user).
Since the diff feature produces a large amount of output, it is best used when checking a single host at a time, like so::