Details
Description
Basic Info
Module Version: 2.3.0
Puppet Version: N/A
OS Name/Version: N/A
The template that is used to check of a login exists (templates\query\login_exists.sql.erb) has a redundant END statement due to it mistakenly being put outside of an if statment. The impact is that even if a login does not exist when using ensure => absent, the resource will run anyway and cause an error in the report.
The error is not a syntax error for the erb template language, but results in a dynamic sql statement that throws a syntax error when run against the server. Since the return code is non-zero the `onlyif` clause of the tsql resource causes the delete statement to run even if the login is not present, breaking idempotency for the sqlserver::login resource.