lowlydba.sqlserver.ag_listener module – Configures an availability group listener
Note
This module is part of the lowlydba.sqlserver collection (version 3.1.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. If this differs from the listener’s current configuration, the listener is dropped and re-created since this cannot be altered in place. Choices:
|
|
IP address(es) of the listener. Comma separated if multiple. If this differs from the listener’s current IP address(es), the listener is dropped and re-created since IP addresses cannot be altered in place. |
|
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. Only reconciled against an existing listener when |
|
Sets the subnet IP mask(s) of the availability group listener. Comma separated if multiple. Only reconciled against an existing listener when 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 an availability group
lowlydba.sqlserver.availability_group:
sql_instance: sql01.example.com
ag_name: AG_App
- name: Create an availability group listener
lowlydba.sqlserver.ag_listener:
sql_instance: sql01.example.com
ag_name: AG_App
listener_name: AG-App
ip_address:
- 10.0.20.20
subnet_ip:
- 10.0.20.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. |