Note
This module is part of the lowlydba.sqlserver collection (version 2.6.1).
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
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
enabled boolean | Flag to enable or disable the feature. Choices:
|
force boolean | Restart SQL Server and SQL Agent services automatically. Choices:
|
password string | Password for alternative credential to authenticate with Windows. |
sql_instance string / required | The SQL Server instance to modify. |
sql_password string | Password for SQL Authentication. |
sql_username string | Username for SQL Authentication. |
username string | Username for alternative credential to authenticate with Windows. |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in check_mode and return changed status prediction without modifying target. |
platform | Platform: Windows | Target OS/families that can be operated against. |
- name: Enable hadr with service restart
lowlydba.sqlserver.hadr:
sql_instance: sql-01.myco.io
enabled: true
force: true
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
data dictionary | Output from the RestartRequired returned if the setting requires a service restart to take effect. Returned: success, but not in check_mode. |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/lowlydba/sqlserver/hadr_module.html