Doing a dry run using check
Updated Dec 05, 2020 ·
Overview
This lab uses Ansible check mode to preview playbook changes before applying them to managed hosts.
Diagram:

If we don't want to do any update yet and we just want to see a dry-run of what change would take place, we could simply add the --check flag.
As an example, go back to the localhost and this time we just want to know if there'll be any error if we create a second copy of the master.config file.
$ ansible -m copy -a "src=master.gitconfig dest=~/master2-bak.gitconfig" localhost --check
