ansible / ansible.builtin / v2.8.17 / module / mssql_db Add or remove MSSQL databases from a remote host. | "added in version" 2.2 of ansible.builtin" Authors: Vedit Firat Arig (@vedit) preview | supported by communityansible.builtin.mssql_db (v2.8.17) — module
pip
Install with pip install ansible==2.8.17
Add or remove MSSQL databases from a remote host.
# 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
name: aliases: - db description: - name of the database to add or remove required: true state: choices: - present - absent - import default: present description: - The database state target: description: - Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL files (C(.sql)) files are supported. autocommit: default: 'no' description: - Automatically commit the change only if the import succeed. Sometimes it is necessary to use autocommit=true, since some content can't be changed within a transaction. type: bool login_host: description: - Host running the database login_port: default: 1433 description: - Port of the MSSQL server. Requires login_host be defined as other then localhost if login_port is used login_user: description: - The username used to authenticate with login_password: description: - The password used to authenticate with