ansible / ansible.builtin / v2.5.11 / module / mssql_db Add or remove MSSQL databases from a remote host. | "added in version" 2.2 of ansible.builtin" Authors: Vedit Firat Arig preview | supported by communityansible.builtin.mssql_db (v2.5.11) — module
pip
Install with pip install ansible==2.5.11
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 default: null description: - name of the database to add or remove required: true state: choices: - present - absent - import default: present description: - The database state required: false 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. required: false autocommit: choices: - 'false' - 'true' default: false 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. required: false login_host: description: - Host running the database required: false login_port: default: 1433 description: - Port of the MSSQL server. Requires login_host be defined as other then localhost if login_port is used required: false login_user: default: null description: - The username used to authenticate with required: false login_password: default: null description: - The password used to authenticate with required: false