Im trying to understand how / with which provisioners i can orchestrate multiple reboots (Windows only) and have packer continue to run. My use case is installing ~20 applications inside of the windows guest and many of those packages will require a reboot. Since i dont always know what those ~20 apps are i dont have the luxury of being able to use windows-restart provisioner and grouping my app installs.
I don't care what provisioner i use (ansible, shell, powershell etc.) i just need som way of having packer not think something has gone wrong when WinRM is no longer responding for a certain period of time.
Currently my provisioners are split into 2:
"provisioners": [
{
"type": "ansible",
"playbook_file": "ansible/win2016std.yml",
"groups": ["windows"],
"extra_arguments": [
"--connection", "packer",
"--extra-vars", "ansible_shell_type=powershell ansible_shell_executable=None"
]
},
{
"type": "powershell",
"script": "scripts/my_script.ps1"
}
]
however rebooting inside Ansible seems to be a known issue and if i issue one or multiple reboots inside the powershell provisioner (my_script.ps1) i can't find a way to make Packer wait for either a timeout or a signal before it continues.
thanks