lowlydba.sqlserver.ag_listener module – Configures an availability group listener
Note
This module is part of the lowlydba.sqlserver collection (version 2.5.0).
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.ag_listener
.
New in lowlydba.sqlserver 0.5.0
Synopsis
Creates an Availability Group Listener for an existing availability group.
Requirements
The below requirements are needed on the host that executes this module.
dbatools PowerShell module
Parameters
Parameter |
Comments |
---|---|
Name of the target availability group. |
|
Indicates whether the listener uses DHCP. Choices:
|
|
IP address(es) of the listener. Comma separated if multiple. |
|
Name of the Listener to be configured. |
|
Sets the port number used to communicate with the availability group. Default: |
|
The SQL Server instance to modify. |
|
Password for SQL Authentication. |
|
Username for SQL Authentication. |
|
Whether or not the object should be Choices:
|
|
Subnet IP address(es) of the listener. Comma separated if multiple. |
|
Sets the subnet IP mask(s) of the availability group listener. Comma separated if multiple. Default: |
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
- name: Create AG Listener
lowlydba.sqlserver.ag_listener:
sql_instance_primary: sql-01.myco.io
ag_name: AG_MyDatabase
listener_name: aglMyDatabase
ip_address:
- 10.0.20.20
- 10.1.77.77
subnet_ip:
- 255.255.252.0
subnet_mask:
- 255.255.255.0
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. |