lowlydba.sqlserver.maintenance_solution module – Install/update Maintenance Solution by Ola Hallengren
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.maintenance_solution
.
New in lowlydba.sqlserver 0.1.0
Synopsis
A wrapper for
Install-DbaMaintenanceSolution
to fetch the latest version of the Ola Hallengren’s Maintenance Solution, or install from a local cached version.
Requirements
The below requirements are needed on the host that executes this module.
dbatools PowerShell module
Parameters
Parameter |
Comments |
---|---|
Location of the backup root directory. If this is not supplied, the default backup directory will be used. |
|
Time in hours, after which backup files are deleted. Default: |
|
Name of the target database. |
|
If this switch is enabled, the Maintenance Solution will be downloaded from the internet even if previously cached. Choices:
|
|
If this switch is enabled, the corresponding SQL Agent Jobs will be created. Choices:
|
|
If this switch is enabled, the Choices:
|
|
Specifies the path to a local file to install Ola’s solution from. This should be the zip file as distributed by the maintainers. If this option is not specified, the latest version will be downloaded and installed from the Maintenance Solution Github. |
|
If this switch is enabled, the Maintenance Solution will be configured to log commands to a table. Choices:
|
|
Specify the output file directory where the Maintenance Solution will write to. |
|
If this switch is enabled, objects already present in the target database will be dropped and recreated. Choices:
|
|
Specifies which portion of the Maintenance Solution to install. Choices:
|
|
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: Install/Update Maintenance Solution
lowlydba.sqlserver.multitool:
sql_instance: sql-01.myco.io
database: main
replace_existing: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Output from the Returned: success, but not in check_mode. |