lowlydba.sqlserver.hadr module – Enable or disable HADR
Note
This module is part of the lowlydba.sqlserver collection (version 2.2.2).
You might already have this collection installed if you are using the ansible
package.
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.hadr
.
New in lowlydba.sqlserver 0.4.0
Synopsis
Enable or disable the High Availability Disaster Recovery (HADR) feature.
Requirements
The below requirements are needed on the host that executes this module.
dbatools PowerShell module
Parameters
Parameter |
Comments |
---|---|
Flag to enable or disable the feature. Choices:
|
|
Restart SQL Server and SQL Agent services automatically. Choices:
|
|
Password for alternative credential to authenticate with Windows. |
|
The SQL Server instance to modify. |
|
Password for SQL Authentication. |
|
Username for SQL Authentication. |
|
Username for alternative credential to authenticate with Windows. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target. |
|
Platform: Windows |
Target OS/families that can be operated against. |
Examples
- name: Enable hadr with service restart
lowlydba.sqlserver.hadr:
sql_instance: sql-01.myco.io
enabled: true
force: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Output from the RestartRequired returned if the setting requires a service restart to take effect. Returned: success, but not in check_mode. |