lowlydba.sqlserver.ag_listener (2.3.2) — module

Configures an availability group listener

| "added in version" 0.5.0 of lowlydba.sqlserver"

Authors: John McCall (@lowlydba)

Install collection

Install with ansible-galaxy collection install lowlydba.sqlserver:==2.3.2


Add to requirements.yml

  collections:
    - name: lowlydba.sqlserver
      version: 2.3.2

Description

Creates an Availability Group Listener for an existing availability group.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create Availability Group
  lowlydba.sqlserver.availability_group:
    sql_instance: sql-01.myco.io
    ag_name: AG_MyDatabase
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
dhcp:
    default: false
    description:
    - Indicates whether the listener uses DHCP.
    required: false
    type: bool

port:
    default: 1433
    description:
    - Sets the port number used to communicate with the availability group.
    required: false
    type: int

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether or not the object should be C(present) or C(absent).
    required: false
    type: str

ag_name:
    description:
    - Name of the target availability group.
    required: true
    type: str

subnet_ip:
    description:
    - Subnet IP address(es) of the listener. Comma separated if multiple.
    required: false
    type: str

ip_address:
    description:
    - IP address(es) of the listener. Comma separated if multiple.
    required: false
    type: str

subnet_mask:
    default: 255.255.255.0
    description:
    - Sets the subnet IP mask(s) of the availability group listener. Comma separated if
      multiple.
    required: false
    type: str

sql_instance:
    description:
    - The SQL Server instance to modify.
    required: true
    type: str

sql_password:
    description:
    - Password for SQL Authentication.
    required: false
    type: str

sql_username:
    description:
    - Username for SQL Authentication.
    required: false
    type: str

listener_name:
    description:
    - Name of the Listener to be configured.
    required: true
    type: str

Outputs

data:
  description: Output from the C(Add-DbaAgListener) or C(Set-DbaAgListener) function.
  returned: success, but not in check_mode.
  type: dict