Hey @Pavan, you can use the following task for your playbook:
- name: Copy database dump file
copy:
src: dump.sql.bz2
dest: /tmp
- name: Restore database
mysql_db:
name: my_db
state: import
target: /tmp/dump.sql.bz2
There are two tasks, one for transferring data to the remote and the other for restoring.