I am working on a role for work, and it needs to keep the source directory ( that lives on the ansible controlnode ), and the destination ( lives on teh remote ) in sync. I know that the copy module can keep the changes/additions in sync. I am not so much worried about that part. Where I am getting stuck, is how to handle if we delete a file at the source, and want that delete carried forward to the remote.
Is there a good way to do that, other than stat the files, loop through the variable, and delete anything that doesn’t exist?
Any advice you have here would be much appreciated.
–John