How to restore from backup for synchronize module if service fails to start

Hi,
I’m new to ansible, so looking for some pointers or samples.
I have a directory of monit conf files on my ansible server that I want to send to remote hosts using synchronize module.
Once I synchronize the conf directory, I want to reload monit. If monit fails to start due to syntax errors in the conf files, then I want to restore the original conf files that are working before from backup.
I couldn’t figure out how to do this last step. any pointers?

This is what I have so far