Skipping tasks or ignoring errors in check mode
If you want to skip a task or ignore errors on a task when you run Ansible in check mode, you can use a boolean magic variableansible_check_mode, which is set toTruewhen Ansible runs in check mode. For example: