lowlydba.sqlserver.credential (2.3.2) — module

Configures a credential on a SQL server

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

Authors: Joe Krilov (@Joey40), 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, replaces, or removes a credential on a SQL server.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a credential with a password
  lowlydba.sqlserver.credential:
    sql_instance: sql-01.myco.io
    identity: ad\\user
    name: MyCredential
    password : <Password>
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Replace an existing credential
  lowlydba.sqlserver.credential:
    sql_instance: sql-01.myco.io
    identity: MyIdentity
    force: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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>
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a credential
  lowlydba.sqlserver.credential:
    sql_instance: sql-01.myco.io
    identity: MyIdentity
    state: absent

Inputs

    
name:
    description:
    - The Credential name.
    required: false
    type: str

force:
    default: false
    description:
    - If this switch is enabled, the existing credential will be dropped and recreated.
    type: bool

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

identity:
    description:
    - The Credential Identity.
    required: true
    type: str

password:
    description:
    - Password used to authenticate the Credential Identity.
    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

provider_name:
    description:
    - Specifies the cryptographic provider name for the Enterprise Key Management Provider.
    required: false
    type: str

mapped_class_type:
    choices:
    - CryptographicProvider
    - None
    description:
    - Sets the class associated with the credential.
    required: false
    type: str

Outputs

data:
  description: Output from the C(New-DbaDbCredential), C(Get-DbaDbCredential), or
    C(Remove-DbaDbCredential) function.
  returned: success, but not in check_mode.
  type: dict