Describe the bug
I'm using lowlydba.sqlserver.login module version 2.3.3
The return value of changed is always set to true even when the user in the server already exists.
To Reproduce
- name: Create a login for user
lowlydba.sqlserver.login:
sql_instance: '{{ mssql_instance }}'
sql_username: '{{ mssql_sa_login }}'
sql_password: '{{ mssql_sa_password }}'
login: '{{ mssql_user_login }}'
password: '{{ mssql_user_password }}'
state: present
Expected behavior
If I run this taks when the user in the database doesn't exist, the return value of changed should be true, which it is.
If I run when the user in the database already exists, the return value of changed should be false.
Which is not the case for me, I keep getting a changed return value.
Versions:
OS: Windows Server 2019 WSL1 on controller node / Windows Server 2019 on target node.
SQL Server: 2019
PowerShell: 5.1
lowlydba.sqlserver: 2.3.3
Additional context
Ansible output given : (I replaced my actuals hosts, instance names and user logins values with replacement names).
For information I later used a PowerShell task using win_powershell and invoking dbatools cmdlets to add this users to the sysadmin server role (that's why in the output the user appears as a member of the sysadmin role).
Describe the bug I'm using lowlydba.sqlserver.login module version 2.3.3 The return value of changed is always set to true even when the user in the server already exists.
To Reproduce
Expected behavior If I run this taks when the user in the database doesn't exist, the return value of changed should be true, which it is. If I run when the user in the database already exists, the return value of changed should be false. Which is not the case for me, I keep getting a changed return value.
Versions:
Additional context Ansible output given : (I replaced my actuals hosts, instance names and user logins values with replacement names). For information I later used a PowerShell task using win_powershell and invoking dbatools cmdlets to add this users to the sysadmin server role (that's why in the output the user appears as a member of the sysadmin role).