ansible unarchive – file not found

This strange thing happened where I tried this :

- name: Extract archive
  unarchive: src=src/dir/file.ext dest=dest/dir

It started complaining that “input file not found atĀ src/dir/file.ext”. After trying out a lot of options like checking file path, checking permissions, I finally found from this stackoverflow post that “copy=no” would do the magic. So basically it was searching in the host machine, rather than the remote. Hence this worked

unarchive: src=src/dir/file.ext dest=dest/dir copy=no

Simple !