arm-template - azure arm 模板在部署期间安装 2 个自定义应用程序......但只有 1 个应用程序正在安装
问题描述
我试图在部署期间通过相同的 arm 模板安装 2 个自定义应用程序。arm 模板将进行域加入。然后在重新启动后去安装应用程序。
记事本++ 和 Sophos。
我遇到的问题是只有 1 个应用程序会安装,它不会继续安装到下一个应用程序。我想也许不需要在记事本++部分重新启动。
我阅读了以下帖子通过同一 VM 上的 Azure 模板运行多个自定义脚本 ,它提到需要一个 dependsOn,但我不明白 sophos 将如何依赖 notepad++ 安装,所以我不完全确定发生了什么..
据我所知,template.json 代码是正确的。
任何人都可以看到任何不正确的东西吗?
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2016-04-30-preview",
"name": "[concat(parameters('virtualMachineName'),'/joindomain')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]"
],
"tags": "[parameters('tags')]",
"properties": {
"publisher": "Microsoft.Compute",
"type": "JsonADDomainExtension",
"typeHandlerVersion": "1.3",
"autoUpgradeMinorVersion": true,
"settings": {
"Name": "[parameters('domainToJoin')]",
"OUPath": "[parameters('DomainOuPath')]",
"User": "[concat(parameters('domainToJoin'), '\\', parameters('domainJoinUserName'))]",
"Restart": "true",
"Options": "[parameters('domainJoinOptions')]"
},
"protectedSettings": {
"Password": "[parameters('domainJoinUserPassword')]"
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'), '/Notepadplusplus')]",
"apiVersion": "2015-05-01-preview",
"location": "[parameters('location')]",
"dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]" ],
"tags": "[parameters('tags')]",
"properties": { "publisher": "Microsoft.Compute",
"type": "CustomScriptExtension", "typeHandlerVersion": "1.3", "autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [ "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.1.9/npp.8.1.9.Installer.x64.exe"],
"Restart": "true"
},
"protectedSettings": {
"commandToExecute": "npp.8.1.9.Installer.x64.exe /S"
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(parameters('virtualMachineName'), '/SophosInstall')]",
"apiVersion": "2015-05-01-preview",
"location": "[parameters('location')]",
"dependsOn": [ "[concat('Microsoft.Compute/virtualMachines/',parameters('virtualMachineName'))]" ],
"tags": "[parameters('tags')]",
"properties": { "publisher": "Microsoft.Compute",
"type": "CustomScriptExtension", "typeHandlerVersion": "1.3", "autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [ "https://dzr-api-amzn-eu-west-1-9af7.api-upe.p.hmr.sophos.com/api/download/cfd5ef35d72a66d96e761ba9222464d8/SophosSetup.exe"
]
},
"protectedSettings": {
"commandToExecute": "SophosSetup.exe --quiet --devicegroup=\"Test servers\""
}
}
}
解决方案
推荐阅读
- powershell - Select-Object 确实转换数据,但也将语句保留在它的数据中
- angular - agm-snazzy-info-window 显示在随机位置
- python - 来自 lxml 的意外 htmlelement 结果
- python - tkinter 绑定到“
"不工作 - node.js - 使用 Node FileSystem fs.writeFileSync() 将 JSON 数据写入文件
- azure - ADF 映射数据流 - 重用单个运行的 spark 集群以并行执行映射数据流
- html - 在模态对话框中实现下拉菜单:我无法设置动态显示的值
- javascript - 我从 RestAPI 得到一个 json 对象的列表,我想在节点红色仪表板中可视化该列表的第一个值
- ffmpeg - FFMPEG 在 concat 后降低帧速率,并增加视频持续时间
- heroku - 将 RedisDB 与 Express-Gateway 一起使用。如何从 .ENV 读取数据库凭据?