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.
I had hoped something like expect_disconnect 
(https://www.packer.io/docs/provisioners/shell.html#expect_disconnect) 
could be used but i can't find that anywhere in a provisioner i can use for 
Windows?

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

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/390b54a9-30d8-444b-91fe-488f07b3aa3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to