lowlydba.sqlserver.maintenance_solution (2.3.2) — module

Install/update Maintenance Solution by Ola Hallengren

| "added in version" 0.1.0 of lowlydba.sqlserver"

Authors: John McCall (@lowlydba)

Install collection

Install with ansible-galaxy collection install lowlydba.sqlserver:==2.3.2


Add to requirements.yml

  collections:
    - name: lowlydba.sqlserver
      version: 2.3.2

Description

A wrapper for C(Install-DbaMaintenanceSolution) to fetch the latest version of the Ola Hallengren's Maintenance Solution, or install from a local cached version.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install/Update Maintenance Solution
  lowlydba.sqlserver.multitool:
    sql_instance: sql-01.myco.io
    database: main
    replace_existing: true

Inputs

    
force:
    default: false
    description:
    - If this switch is enabled, the Maintenance Solution will be downloaded from the
      internet even if previously cached.
    type: bool

database:
    description:
    - Name of the target database.
    required: true
    type: str

solution:
    choices:
    - All
    - Backup
    - IntegrityCheck
    - IndexOptimize
    default: All
    description:
    - Specifies which portion of the Maintenance Solution to install.
    required: false
    type: str

local_file:
    description:
    - 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 L(Maintenance Solution Github,https://github.com/olahallengren/sql-server-maintenance-solution).
    required: false
    type: str

cleanup_time:
    default: 0
    description:
    - Time in hours, after which backup files are deleted.
    required: false
    type: int

install_jobs:
    default: false
    description:
    - If this switch is enabled, the corresponding SQL Agent Jobs will be created.
    required: false
    type: bool

log_to_table:
    default: false
    description:
    - If this switch is enabled, the Maintenance Solution will be configured to log commands
      to a table.
    required: false
    type: bool

sql_instance:
    description:
    - The SQL Server instance to modify.
    required: true
    type: str

sql_password:
    description:
    - Password for SQL Authentication.
    required: false
    type: str

sql_username:
    description:
    - Username for SQL Authentication.
    required: false
    type: str

backup_location:
    description:
    - Location of the backup root directory. If this is not supplied, the default backup
      directory will be used.
    required: false
    type: str

output_file_dir:
    description:
    - Specify the output file directory where the Maintenance Solution will write to.
    required: false
    type: str

install_parallel:
    default: false
    description:
    - If this switch is enabled, the C(Queue) and C(QueueDatabase) tables are created,
      for use when C(@DatabasesInParallel = 'Y') are set in the jobs.
    required: false
    type: bool

replace_existing:
    description:
    - If this switch is enabled, objects already present in the target database will be
      dropped and recreated.
    required: false
    type: bool

Outputs

data:
  description: Output from the C(Install-MaintenanceSolution) function.
  returned: success, but not in check_mode.
  type: dict