mssql_db – Add or remove MSSQL databases from a remote host¶
The below requirements are needed on the host that executes this module.
python >= 2.7
Requires the pymssql Python package on the remote host. For Ubuntu, this is as easy as pip install pymssql (See pip.)
# Create a new database with name 'jackdata' - mssql_db: name: jackdata state: present # Copy database dump file to remote host and restore it to database 'my_db' - copy: src: dump.sql dest: /tmp - mssql_db: name: my_db state: import target: /tmp/dump.sql