"os_type": "windows",
"image_publisher": "MicrosoftWindowsDesktop",
"image_offer": "Windows-10",
"image_sku": "RS3-PRO",
"os_disk_size_gb": "{{user `os_disk_size_gb`}}",
"virtual_network_name": "XXXXX",
"virtual_network_resource_group_name": "XXXXXX",
"virtual_network_subnet_name": "XXXXXX",
"communicator": "winrm",
"winrm_password" : "{{user `client_secret`}}",
"winrm_use_ssl": "true",
"winrm_insecure": "true",
"winrm_timeout": "3m",
"winrm_username": "packer",
"azure_tags": {
"dept": "engineering",
"task": "image deployment"
},
"location": "North Europe",
"vm_size": "Standard_DS2_v2"
}],
"provisioners": [
{
"user": "my_user",
"type": "ansible",
"playbook_file": "ansible/{{user `winconfig`}}.yml",
"groups": [ "packer" ],
"host_alias": "packer",
"extra_arguments": [
"--connection", "packer",
"--extra-vars", "ansible_shell_type=powershell ansible_shell_executable=None",
"--extra-vars", "winrm_password={{user `client_secret`}}",
"--vault-password-file={{user `ansiblevaultpwdfile`}}"
]
}