我实际上在superUser上发布了这个问题,但我认为它可能在错误的地方 . 我很抱歉 .
我一直在使用ansible和WinRM来管理Windows服务器,并且使用它来运行基本命令略有成功 .
但是,当我尝试从powershell脚本中运行exe文件时,它会失败 .
当我直接从Windows运行时,它运行完全没有任何错误 . 它抛出的唯一错误是一个Access Denied错误,它会链接到权限,但是作为管理员,它应该具有完全权限吗?
我尝试运行的powershell脚本是:
Write-Host "Installing SQL Server"
C:\software-downloads\SQL\setup.exe /ConfigurationFile=C:\software-downloads\ConfigurationFile.ini
Ansible抛出的错误是:
The following error occurred:
There was an error generating the XML document.
Error result: -2068774911
Result facility code: 1201
Result error code: 1
Please review the summary.txt log for further details
并查看它显示的摘要日志文件:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2068774911
Exit facility code: 1201
Exit error code: 1
Exit message: There was an error generating the XML document.
Start time: 2016-06-24 06:47:55
End time: 2016-06-24 06:48:15
Requested action: Install
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.4100.1&EvtType=0xE0C083E6%400xF80B8030&EvtType=0xE0C083E6%400xF80B8030
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException
Message:
There was an error generating the XML document.
HResult : 0x84b10001
FacilityCode : 1201 (4b1)
ErrorCode : 1 (0001)
Data:
DisableWatson = true
Stack:
at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(Object objectToSerialize)
at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.CalculateSettings(IEnumerable`1 settingIds)
at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.CalculateAllSettings(Boolean chainerSettingOnly)
at Microsoft.SqlServer.Configuration.SetupExtension.FinalCalculateSettingsAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.b__b()
at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
Inner exception type: System.InvalidOperationException
Message:
There was an error generating the XML document.
HResult : 0x80131509
Stack:
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
Inner exception type: System.Security.Cryptography.CryptographicException
Message:
Access is denied.
HResult : 0x80070005
Stack:
at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
at Microsoft.SqlServer.Common.SqlSecureString.WriteXml(XmlWriter writer)
at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable(IXmlSerializable serializable, String name, String ns, Boolean isNullable, Boolean wrapped)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterAgentConfigurationPublic.Write6_AgentConfigurationPublic(String n, String ns, AgentConfigurationPublic o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterAgentConfigurationPublic.Write7_AgentConfigurationPublic(Object o)
当我点击它时,异常帮助链接不会去任何地方 .
我尝试使用启动进程传递凭据,但这不起作用,因为我可能使用它错误,因为我必须作为参数传递配置文件 .
我知道它运行正常,因为我可以运行其他脚本,包括从S3下载文件和自动加入域 .
有没有人通过ansible在Windows中成功安装了exe文件?任何帮助都会很棒,因为我甚至可能过度简单了?