Is it possible to synchronize contents of a directory only?

Solution 1:

All you need to do is add a trailing slash to the end of the source path. This will tell Ansible it is the files in the directory, and not the directory and its contents, that you want to transfer.

This behaviour is identical to that of rsync.