lowlydba.sqlserver.tcp_port (2.3.2) — module

Sets the TCP port for the instance

| "added in version" 0.10.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

Sets the TCP port for a SQL Server instance.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the default port
  lowlydba.sqlserver.tcp_port:
    sql_instance: sql-01.myco.io
    port: 1433
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set a non-standard default port
  lowlydba.sqlserver.tcp_port:
    sql_instance: sql-01.myco.io
    port: 1933

Inputs

    
port:
    description:
    - Port for SQL Server to listen on.
    required: true
    type: int

force:
    default: false
    description:
    - Restart SQL Server and SQL Agent services automatically.
    required: false
    type: bool
    version_added: 1.2.0
    version_added_collection: lowlydba.sqlserver

password:
    description:
    - Password for alternative credential to authenticate with Windows.
    required: false
    type: str

username:
    description:
    - Username for alternative credential to authenticate with Windows.
    required: false
    type: str

ip_address:
    description:
    - IPv4 address.
    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

Outputs

data:
  description:
  - Output from the C(Set-DbaTcpPort) function.
  - RestartRequired returned if the change requires a service restart to take effect.
  returned: success, but not in check_mode.
  type: dict