Hey there,
Your understanding of the middleware class is correct! Your action is likely technically running
after the builtin Provision action (I assume Provision in this case is the action coming from core Vagrant).
The trick is that the Provision action does not totally function in an obvious way :) This might be more
obvious if you run vagrant with the --debug flag.
If you look closely at the
builtin Provision action, when it runs it initially only sets up the provisioner prior to the vm
booting. So if you were running Vagrant without the debug flag, the UI output might make it seem like your custom action
is running before the Provision action step. But what's actually happening is the provisioner action sets up the provisioner
to be run later, and then the middleware goes on and executes your custom action class and anything else on the stack.
I assume you are writing this for a Vagrant plugin? If you're writing your own plugin, you can make your custom
Hope this clears things up, thanks!