Suppose you have a sql-file database.sql, which creates the database schema, the table within it and some initial filling. Normally, I can use ansible to make this database by:
---
- name: copy database.sql to server
template: src=database.sql dest=/tmp/database.sql owner=root group=root
- name: sql the thing into MySQL
command: mysql "-u root -p{{ mysql_root_password }} < /tmp/database.sql"
- name: remove the sql file from the server
command: rm -f /tmp/database.sql
and this does exactly what it says. But when database.sql is large (perhaps 2 TByte) you really don't want the copying action first. Are there ways to refer to database.sql as a file on the ansible-master server (where we push it from) such that you can do a mysql -u root@master -p... < "local file" such that the copy action isn't needed anymore ?