我也遇到了这个问题,解决办法是使用配置资源中的dependsOn属性来有效地将它们链接在一起,因为它们是串行而不是并行执行的。
这是一个例子
{
"name": "[variables('dscConfigurations').DomainJoinConfig.name]",
"type": "configurations",
"apiVersion": "2015-10-31",
"location": "[variables('location')]",
"dependsOn": [
"[variables('AutomationAccountName')]",
"dscDomainAdmin"
],
"properties": {
"state": "Published",
"overwrite": "true",
"source": {
"type": "uri",
"value": "[concat(parameters('_artifactsLocation'), variables('dscConfigurations').DomainJoinConfig.script, parameters('_artifactsLocationSasToken'))]"
}
}
},
{
"name": "[variables('dscConfigurations').AddServerRolesAndFeaturesArchive.name]",
"type": "configurations",
"apiVersion": "2015-10-31",
"location": "[variables('location')]",
"dependsOn": [
"[variables('AutomationAccountName')]",
"[variables('dscResources').xPendingReboot.name]",
"[variables('dscConfigurations').DomainJoinConfig.name]"
],
"properties": {
"state": "Published",
"overwrite": "true",
"source": {
"type": "uri",
"value": "[concat(parameters('_artifactsLocation'), variables('dscConfigurations').AddServerRolesAndFeaturesArchive.script, parameters('_artifactsLocationSasToken'))]"
}
}
},
{
"name": "[variables('dscConfigurations').AddServerRoleAndFeaturesContent.name]",
"type": "configurations",
"apiVersion": "2015-10-31",
"location": "[variables('location')]",
"dependsOn": [
"[variables('AutomationAccountName')]",
"[variables('dscResources').xPendingReboot.name]",
"[variables('dscConfigurations').AddServerRolesAndFeaturesArchive.name]"
],
"properties": {
"state": "Published",
"overwrite": "true",
"source": {
"type": "uri",
"value": "[concat(parameters('_artifactsLocation'), variables('dscConfigurations').AddServerRoleAndFeaturesContent.script, parameters('_artifactsLocationSasToken'))]"
}
}
},