-
-
Save oguzhaneren/e8f163134d4a005fef390e5bd8cddde0 to your computer and use it in GitHub Desktop.
Packer script for creating Windows VMs in Azure
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`}}", | |
"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