Created
August 18, 2016 15:16
-
-
Save ritasker/502dc2908623442d1495ff87c1ca8563 to your computer and use it in GitHub Desktop.
Packer File for Provisioning Windows VM Images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"client_id": "", | |
"client_secret": "", | |
"subscription_id": "", | |
"tenant_id": "", | |
"object_id": "", | |
"resource_group": "", | |
"storage_account": "", | |
"vm_size": "", | |
"location": "" | |
}, | |
"builders": [{ | |
"type": "azure-arm", | |
"client_id": "{{user `client_id`}}", | |
"client_secret": "{{user `client_secret`}}", | |
"subscription_id": "{{user `subscription_id`}}", | |
"tenant_id": "{{user `tenant_id`}}", | |
"object_id": "{{user `object_id`}}", | |
"resource_group_name": "{{user `resource_group`}}", | |
"storage_account": "{{user `storage_account`}}", | |
"capture_container_name": "images", | |
"capture_name_prefix": "packer", | |
"os_type": "Windows", | |
"image_publisher": "MicrosoftWindowsServer", | |
"image_offer": "WindowsServer", | |
"image_sku": "2012-R2-Datacenter", | |
"communicator": "winrm", | |
"winrm_use_ssl": "true", | |
"winrm_insecure": "true", | |
"winrm_timeout": "3m", | |
"winrm_username": "packer", | |
"location": "{{user `location`}}", | |
"vm_size": "{{user `vm_size`}}" | |
}], | |
"provisioners": [ | |
{ | |
"type": "powershell", | |
"inline": [ | |
"Set-ExecutionPolicy -ExecutionPolicy RemoteSigned", | |
"iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex", | |
"choco install wkhtmltopdf", | |
"choco install octopusdeploy.tentacle" | |
] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment