以下是模板代码的一部分。现在脚本是并行执行的。如何从DockerExtension添加CustomScriptForLinux依赖项,首先使用DockerExtension,然后使用CustomScriptForLinux?
{
"type": "Microsoft.Compute/virtualMachineScaleSets",
"name": "[variables('namingInfix')]",
"location": "[variables('location')]",
"apiVersion": "2016-03-30",
"tags": {
"displayName": "VMScaleSet"
},
"extensionProfile": {
"extensions": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('namingInfix'), 'DockerExtension')]",
"location": "[variables('location')]",
"properties": {
"publisher": "Microsoft.Azure.Extensions",
"type": "DockerExtension",
"typeHandlerVersion": "1.1",
"autoUpgradeMinorVersion": true,
"settings": {},
"protectedSettings": {}
}
},
{
"name": "ConfigureNginx",
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('_artifactsLocation'), '/', variables('ConfigureNginxScriptFolder'), '/', variables('ConfigureNginxScriptFileName'), parameters('_artifactsLocationSasToken'))]"
],
"commandToExecute": "[concat('sh ', variables('ConfigureNginxScriptFileName'))]"
}
}
}
答案 0 :(得分:1)
dependsOn
您无法拥有extensions
属性,因此您的主要解决方法是:
script1.done
的文件时等待