Azure ARMTemplate模板,VM扩展命令
Azure ARM模板中,给虚拟机安装扩展脚本的命令
"resources": [
{
"apiVersion": "[variables('apiVersion')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('nginxVmNamePrefix'), copyIndex(),'/LinuxRMCustomScriptExtension')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/',parameters('nginxVmNamePrefix'),copyIndex())]"
],
"properties": {
"publisher": "Microsoft.OSTCExtensions",
"type": "CustomScriptForLinux",
"typeHandlerVersion": "1.4",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(variables('nginxInstallScriptPrefix'), '.sh')]"
],
"commandToExecute": "[concat('sh ', variables('nginxInstallName'), '.sh', ' ', copyIndex(), ' ', parameters('numberOfWebClusterInstances'), ' ', variables('webClusterStartIPAddress'))]"
}
}
}
]