Win_dsc specifying Group Managed Service Account
taschaal opened this issue · 1 comments
taschaal commented
SUMMARY
Using win_dsc with dsc resource SQL Setup, and I can't see how to specify a group managed service account.
ISSUE TYPE
- Documentation Report
COMPONENT NAME
win_dsc
ANSIBLE VERSION
ansible-playbook 2.9.27
config file = None
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 2.7.18 (default, May 30 2022, 10:09:41) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
TASK [sqlserver : install sql server] ******************************************
task path: /var/lib/jenkins/workspace/DBA_Projects/Add_SQL_Instance_test/roles/sqlserver/tasks/main.yml:231
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/windows/win_dsc.ps1
Pipelining is enabled.
<servername> ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO servername
calling kinit with subprocess for principal ansible
EXEC (via pipeline wrapper)
[WARNING]: [servername]:
[[SqlSetup]DirectResourceAccess] Setup exited with code '-2061893628'. Please
see the 'Summary.txt' log file in the 'Setup Bootstrap\Log' folder.
fatal: [servername]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"ASBackupDir": null,
"ASCollation": null,
"ASConfigDir": null,
"ASDataDir": null,
"ASLogDir": null,
"ASServerMode": null,
"ASSvcAccount_password": null,
"ASSvcAccount_username": null,
"ASSysAdminAccounts": null,
"ASTempDir": null,
"Action": null,
"AgtSvcAccount_password": null,
"AgtSvcAccount_username": null,
"AgtSvcStartupType": null,
"AsSvcStartupType": null,
"BrowserSvcStartupType": null,
"DependsOn": [
"[Win********owsFeature]NetFramework35",
"[Win********owsFeature]NetFramework45"
],
"ErrorReporting": null,
"FTSvcAccount_password": null,
"FTSvcAccount_username": null,
"FailoverClusterGroupName": null,
"FailoverClusterIPAddress": null,
"FailoverClusterNetworkName": null,
"FeatureFlag": null,
"Features": "SQLENGINE,CONN,BC,SDK",
"ForceReboot": false,
"ISSvcAccount_password": null,
"ISSvcAccount_username": null,
"InstallSQLDataDir": "D:\\MssqlServer\\SQL2019",
"InstallSharedDir": "D:\\MssqlServer\\SQL2019",
"InstallSharedWOWDir": "D:\\Program Files (x86)\\Microsoft SQL Server",
"InstanceDir": "D:\\MssqlServer\\SQL2019",
"InstanceID": null,
"InstanceName": "MSSQLSERVER",
"IsSvcStartupType": null,
"NpEnabled": true,
"ProductKey": null,
"PsDscRunAsCredential_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"PsDscRunAsCredential_username": "runascred",
"RSInstallMode": null,
"RSSVCStartupType": null,
"RSSvcAccount_password": null,
"RSSvcAccount_username": null,
"SAPwd_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"SAPwd_username": "sa",
"SQLBackupDir": "D:\\backup01\\MSSQLSERVER\\Backup",
"SQLCollation": "SQL_Latin1_General_CP1_CI_AS",
"SQLSvcAccount_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"SQLSvcAccount_username": "dmainname\\\\gmsa_name$",
"SQLSysAdminAccounts": [
"dmainname\\\\********ba"
],
"SQLTempDBDir": "D:\\servername_temp********b\\MssqlServer\\SQLData\\Data",
"SQLTempDBLogDir": "D:\\servername_temp********b\\MssqlServer\\SQLData\\Tlog",
"SQLUserDBDir": "D:\\servername\\MssqlServer\\SQLData\\Data",
"SQLUserDBLogDir": "D:\\servername\\MssqlServer\\SQLData\\Tlog",
"SQMReporting": null,
"SecurityMode": "SQL",
"ServerName": null,
"SetupProcessTimeout": null,
"SkipRule": null,
"SourceCredential_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"SourceCredential_username": "sourcecred@domain.com",
"SourcePath": "\\\\sourceserver\\sqlsvrstage\\SQL2019\\Stan********ar********_E********ition",
"SqlSvcStartupType": null,
"SqlTempdbFileCount": null,
"SqlTempdbFileGrowth": null,
"SqlTempdbFileSize": null,
"SqlTempdbLogFileGrowth": null,
"SqlTempdbLogFileSize": null,
"SuppressReboot": null,
"TcpEnabled": true,
"UpdateEnabled": "True",
"UpdateSource": ".\\Up********ates",
"UseEnglish": null,
"module_version": "latest",
"resource_name": "SQLSetup"
}
},
"module_version": "16.3.1",
"msg": "Faile******** to invoke DSC Set metho********: PowerShell DSC resource DSC_SqlSetup faile******** to execute Set-TargetResource functionality with error message: System.Exception: Test-TargetResource function returne******** false when Set-TargetResource function verifie******** the ********esire******** state. This in********icates that the Set-TargetResource ********i******** not correctly set the ********esire******** state, or that the function Test-TargetResource ********oes not correctly evaluate the ********esire******** state. Please look for reporte******** errors from the setup.exe in the SQL Server setup logs, see more information on how to ********o that in the article https://********ocs.microsoft.com/en-us/sql/********atabase-engine/install-win********ows/view-an********-rea********-sql-server-setup-log-files (View an******** Rea******** SQL Server Setup Log Files). ",
"reboot_required": false,
"verbose_set": [
"Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceSet,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.",
"An LCM method call arrived from computer servername with user sid S-1-5-21-1241546611-414721642-837300805-261302.",
"[servername]: LCM: [ Start Set ] [[SqlSetup]DirectResourceAccess]",
"[servername]: [[SqlSetup]DirectResourceAccess] Using path '\\\\sourceserver\\sqlsvrstage\\SQL2019\\Standard_Edition\\setup.exe'.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Database Engine feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Database Engine feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Full-text feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Full-text feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Reporting Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Reporting Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Analysis Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Analysis Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Integration Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Integration Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Data Quality Client feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Data Quality Client feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Documentation Components feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Connectivity Tools feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Connectivity Backwards Compatibility Tools feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Tools SDK feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Master Data Services (MDS) feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Master Data Services (MDS) feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Robocopy is copying media from source '\\\\sourceserver\\sqlsvrstage\\SQL2019\\Standard_Edition' to destination 'C:\\Users\\ansible\\AppData\\Local\\Temp\\Standard_Edition'. (SQLCOMMON0008)",
"[servername]: [[SqlSetup]DirectResourceAccess] Robocopy is using unbuffered I/O. (SQLCOMMON0009)",
"[servername]: [[SqlSetup]DirectResourceAccess] Robocopy is started with the following arguments: \"\\\\sourceserver\\sqlsvrstage\\SQL2019\\Standard_Edition\" \"C:\\Users\\ansible\\AppData\\Local\\Temp\\Standard_Edition\" /e /purge /J /njh /njs /ndl /nc /ns /nfl (SQLCOMMON0011)",
"[servername]: [[SqlSetup]DirectResourceAccess] Robocopy reported that all files already present. (SQLCOMMON0016)",
"[servername]: [[SqlSetup]DirectResourceAccess] Using path 'C:\\Users\\ansible\\AppData\\Local\\Temp\\Standard_Edition\\setup.exe'.",
"[servername]: [[SqlSetup]DirectResourceAccess] Loading module from path 'C:\\Program Files\\WindowsPowerShell\\Modules\\SqlServerDsc\\16.3.1\\Modules\\DscResource.Base\\1.1.0\\DscResource.Base.psm1'.",
"[servername]: [[SqlSetup]DirectResourceAccess] Adding user 'ansible' from the parameter 'PsDscRunAsCredential' as the first system administrator account for SQL Server.",
"[servername]: [[SqlSetup]DirectResourceAccess] Starting setup using arguments: /TCPENABLED=\"1\" /ACTION=\"Install\" /SQLTEMPDBLOGDIR=\"D:\\servername_temp********b\\MssqlServer\\SQLData\\Tlog\" /NPENABLED=\"1\" /SQLUSERDBDIR=\"D:\\servername\\MssqlServer\\SQLData\\Data\" /IACCEPTSQLSERVERLICENSETERMS=\"True\" /SECURITYMODE=\"SQL\" /SQLUSERDBLOGDIR=\"D:\\servername\\MssqlServer\\SQLData\\Tlog\" /INSTALLSHAREDWOWDIR=\"D:\\Program Files (x86)\\Microsoft SQL Server\" /QUIET=\"True\" /INSTANCENAME=\"MSSQLSERVER\" /SQLBACKUPDIR=\"D:\\backup01\\MSSQLSERVER\\Backup\" /UPDATESOURCE=\".\\Up********ates\" /SQLTEMPDBDIR=\"D:\\servername_temp********b\\MssqlServer\\SQLData\\Data\" /INSTANCEDIR=\"D:\\MssqlServer\\SQL2019\" /SQLSYSADMINACCOUNTS=\"ansible\" \"dmainname\\\\********ba\" /SQLSVCACCOUNT=\"dmainname\\\\gmsa_name$\" /SQLCOLLATION=\"SQL_Latin1_General_CP1_CI_AS\" /FEATURES=SQLENGINE,CONN,BC,SDK /INSTALLSQLDATADIR=\"D:\\MssqlServer\\SQL2019\" /INSTALLSHAREDDIR=\"D:\\MssqlServer\\SQL2019\" /UPDATEENABLED=\"True\" /SAPWD=\"********\"",
"[servername]: [[SqlSetup]DirectResourceAccess] Started the process with id 3452 using the path 'C:\\Users\\ansible\\AppData\\Local\\Temp\\Standard_Edition\\setup.exe', and with a timeout value of 7200 seconds. (SQLCOMMON0017)",
"[servername]: [[SqlSetup]DirectResourceAccess] Using path '\\\\sourceserver\\sqlsvrstage\\SQL2019\\Standard_Edition\\setup.exe'.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Database Engine feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Database Engine feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Full-text feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Full-text feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Reporting Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Reporting Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Analysis Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Analysis Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Integration Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Integration Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Data Quality Client feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Data Quality Client feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Documentation Components feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Connectivity Tools feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Connectivity Backwards Compatibility Tools feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Tools SDK feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Master Data Services (MDS) feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Master Data Services (MDS) feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] No features are installed.",
"[servername]: LCM: [ End Set ] [[SqlSetup]DirectResourceAccess] in 22.6040 seconds.",
"Operation 'Invoke CimMethod' complete.",
"Time taken for configuration job to complete is 22.967 seconds"
],
"verbose_test": [
"Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceTest,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.",
"An LCM method call arrived from computer servername with user sid S-1-5-21-1241546611-414721642-837300805-261302.",
"[servername]: LCM: [ Start Test ] [[SqlSetup]DirectResourceAccess]",
"[servername]: [[SqlSetup]DirectResourceAccess] Using path '\\\\sourceserver\\sqlsvrstage\\SQL2019\\Standard_Edition\\setup.exe'.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Database Engine feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Database Engine feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Full-text feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Full-text feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Reporting Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Reporting Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Analysis Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Analysis Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Integration Services feature.",
"[servername]: [[SqlSetup]DirectResourceAccess] Integration Services feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Data Quality Client feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Data Quality Client feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Documentation Components feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Connectivity Tools feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Connectivity Backwards Compatibility Tools feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Documentation Components feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Client Tools SDK feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] Detecting Master Data Services (MDS) feature (HKLM:\\SOFTWARE\\Microsoft\\Microsoft SQL Server\\150\\ConfigurationState).",
"[servername]: [[SqlSetup]DirectResourceAccess] Master Data Services (MDS) feature not detected.",
"[servername]: [[SqlSetup]DirectResourceAccess] No features are installed.",
"[servername]: LCM: [ End Test ] [[SqlSetup]DirectResourceAccess] False in 3.4970 seconds.",
"[servername]: LCM: [ End Set ] in 3.6690 seconds.",
"Operation 'Invoke CimMethod' complete.",
"Time taken for configuration job to complete is 3.941 seconds"
]
}
taschaal commented
Figured it out. GMSA should be specified domain\gmsa_name$ not domain\\gmsa_name$