lowlydba.sqlserver.availability_group module – Configures availability group(s)
Note
This module is part of the lowlydba.sqlserver collection (version 1.1.2).
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.availability_group
.
New in lowlydba.sqlserver 0.4.0
Synopsis
Configures SQL Server Availability Group(s) with up to one replica.
Requirements
The below requirements are needed on the host that executes this module.
dbatools PowerShell module
Parameters
Parameter |
Comments |
---|---|
Name of the Availability Group. |
|
Apply changes to all availability groups on the instance. Only used for configuring existing availability groups. Choices:
|
|
Allow taking a full backup to Choices:
|
|
How to handle backup requests by default. Choices:
|
|
Whether the replica should be Asynchronous or Synchronous. Only used in creating a new availability group. Choices:
|
|
Indicates whether the availability group is Basic Availability Group. Choices:
|
|
Cluster type of the Availability Group. Only supported in SQL Server 2017 and above. Choices:
|
|
Name of the database to create the Availability Group for. |
|
Indicates whether the availability group triggers the database health. Choices:
|
|
Enables Dtc support. Choices:
|
|
Whether the replica have Automatic or Manual failover. Choices:
|
|
Specifies the different conditions that can trigger an automatic failover in Availability Group. Choices:
|
|
Drop and recreate the database on remote servers using fresh backup. Choices:
|
|
This setting used to specify the length of time, in milliseconds, that the SQL Server resource DLL should wait for information returned by the Changes that are made to the timeout settings are effective immediately and do not require a restart of the SQL Server resource. |
|
Indicates whether the availability group is distributed. Choices:
|
|
Default seeding mode for the replica. Should remain as the default otherwise manual setup may be required. Choices:
|
|
The network share where the backups will be backed up and restored from. |
|
The SQL Server instance to modify. |
|
The secondary SQL Server instance for the new Availability Group. |
|
Password for SQL Authentication. |
|
Password for SQL Authentication for the secondary replica. |
|
Username for SQL Authentication. |
|
Username for SQL Authentication for the secondary replica. |
|
Whether or not the object should be Choices:
|
|
Use the last full and log backup of database. A log backup must be the last backup. Choices:
|
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: Create Availability Group
lowlydba.sqlserver.availability_group:
sql_instance: sql-01.myco.io
ag_name: AG_MyDatabase
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. |