lowlydba.sqlserver.install_script module – Runs migration scripts against a database
Note
This module is part of the lowlydba.sqlserver collection (version 2.3.4).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install lowlydba.sqlserver
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: lowlydba.sqlserver.install_script
.
New in lowlydba.sqlserver 0.11.0
Synopsis
Uses the module
DBOps
to runDbo-InstallScript
against a target SQL Server database.
Requirements
The below requirements are needed on the host that executes this module.
Parameters
Parameter |
Comments |
---|---|
Database server connection timeout in seconds. Only affects connection attempts. Does not affect execution timeout. Default: |
|
Will create an empty database if missing. Choices:
|
|
Name of the target database. |
|
Choices:
|
|
Script execution timeout. The script will be aborted if the execution takes more than specified number of seconds. Default: |
|
Runs a regex verification against provided file names using the provided string. |
|
If set, the deployment will not be tracked in the database. That will also mean that all the scripts and all the builds from the package are going to be deployed regardless of any previous deployment history. Choices:
|
|
Only process the first level of the target path. Choices:
|
|
Log output into specified file. |
|
Directory where targeted sql scripts are stored. |
|
A table that will hold the history of script execution. This table is used to choose what scripts are going to be run during the deployment, preventing the scripts from being execured twice. |
|
The SQL Server instance to modify. |
|
Password for SQL Authentication. |
|
Username for SQL Authentication. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target. |
|
Platforms: all |
Target OS/families that can be operated against. |
Examples
- name: Migrate a database
lowlydba.sqlserver.install_script:
sql_instance: test-server.my.company.com
database: AdventureWorks
path: migrations
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Modified output from the Returned: success, but not in check_mode. |