fix: Update SSMS installation path check for v22 - #507
Open
daaash1234 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
check SSMS installation already donetask in themssql_ssmsrole checks a hardcoded path that only matches SSMS 18 (C:\Program Files (x86)\Microsoft SQL Server Management Studio 18). Newer SSMS releases (e.g. SSMS 22) install as a 64-bit application underC:\Program Files\...with a different version-numbered folder name.Because the
win_statcheck never finds a match when a newer SSMS version is installed,ssms_installation.stat.existsis alwaysfalse, causing theInstall SSMStask torun (or re-run) every time the playbook executes — even when SSMS is already installed.
Problem this causes
Install SSMSruns viawin_command(SSMS_installer.exe /install /quiet /norestart), which is executed over WinRM in a non-interactive session./quiet, which has no desktop to render to over WinRM — this causes the task tohang indefinitely with no CPU/network activity.
Fix
Update the
win_statpath check to match the actual install location for the current SSMS version:Testing
Notes for maintainers
This is a minimal, version-specific fix. A more robust long-term approach might check for multiple known SSMS install paths/versions, but that's out of scope for this fix.