I am using Chocolatey with an Azure ARM template to build a VM and then install the required software. I know there is a way to configure the sources location of where Chocolatey pulls the install files from after you've installed Chocolatey, but does anyone know if there is a way to pre-configure the sources location before (or during) Chocolatey installation?
I am wanting to do a complete unattended installation from start to finish, so having to edit the Chocolatey config file after it installs, and before the apps are installed, negates the whole unattended idea.
I have looked at the Chocolatey PS1 install script here: https://chocolatey.org/install.ps1
Sadly I cannot find anything in there that I could edit to modify the source location of the Choco packages.
Here is the Custom Script Extension that is part of the ARM template to install the VM via Azure
{
"name": "[concat(parameters('virtualMachineName'),'/chocolatey')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"[concat('Microsoft.DevTestLab/schedules/', 'shutdown-computevm-', parameters('virtualMachineName'))]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.9",
"autoUpgradeMinorVersion": true,
"settings": {
"fileUris": [
"[concat(parameters('setupChocolatelyScriptLocation'),parameters('setupChocolateyScriptFileName'))]"
],
"commandToExecute": "[concat('powershell -ExecutionPolicy bypass -File ', parameters('setupChocolateyScriptFileName'), ' -chocoPackages ',parameters('chocoPackages'))]"
}
}
},