lowlydba.sqlserver.credential module – Configures a credential on a SQL server
Note
This module is part of the lowlydba.sqlserver collection (version 1.3.1).
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.credential
.
New in lowlydba.sqlserver 1.3.0
Synopsis
Creates, replaces, or removes a credential on a SQL server.
Requirements
The below requirements are needed on the host that executes this module.
dbatools PowerShell module
Parameters
Parameter |
Comments |
---|---|
If this switch is enabled, the existing credential will be dropped and recreated. Choices:
|
|
The Credential Identity. |
|
Sets the class associated with the credential. Choices:
|
|
The Credential name. |
|
Password used to authenticate the Credential Identity. |
|
Specifies the cryptographic provider name for the Enterprise Key Management Provider. |
|
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 credential with a password
lowlydba.sqlserver.credential:
sql_instance: sql-01.myco.io
identity: ad\\user
name: MyCredential
password : <Password>
- name: Replace an existing credential
lowlydba.sqlserver.credential:
sql_instance: sql-01.myco.io
identity: MyIdentity
force: true
- name: Create a credential using a SAS token for a backup URL
lowlydba.sqlserver.credential:
sql_instance: sql-01.myco.io
identity: SHARED ACCESS SIGNATURE
name: https://<azure storage account name>.blob.core.windows.net/<blob container>
password : <Shared Access Token>
- name: Remove a credential
lowlydba.sqlserver.credential:
sql_instance: sql-01.myco.io
identity: MyIdentity
state: absent
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. |