lowlydba.sqlserver.login module – Configures a login for the target SQL Server instance
Note
This module is part of the lowlydba.sqlserver collection (version 1.1.2).
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.login
.
New in lowlydba.sqlserver 0.1.0
Synopsis
Creates, modifies, or removes a Windows or SQL Authentication login on a SQL Server instance.
Requirements
The below requirements are needed on the host that executes this module.
dbatools PowerShell module
Parameters
Parameter |
Comments |
---|---|
Default database for the login. |
|
Whether the login is enabled or disabled. Choices:
|
|
Default language for the login. Only used when creating a new login, not when modifying an existing one. |
|
Name of the login to configure. |
|
Password for the login, if SQL Authentication login. |
|
Enforces password expiration policy. Requires password_policy_enforced=true. Choices:
|
|
Enforces user must change password at next login. When specified will enforce password_expiration_enabled and password_policy_enforced as they are required. Choices:
|
|
Enforces password complexity policy. Choices:
|
|
The SQL Server instance to modify. |
|
Password for SQL Authentication. |
|
Username for SQL Authentication. |
|
Whether or not the object should be Choices:
|
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 a login
lowlydba.sqlserver.login:
sql_instance: sql-01.myco.io
login: TheIntern
password: ReallyComplexStuff12345!
- name: Disable a login
lowlydba.sqlserver.login:
sql_instance: sql-01.myco.io
login: TheIntern
enabled: false
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. |