I am using Vagrant to deploy VMs for development. One of the requirements is that vagrant provision
creates a new user (done in a provisioning script I wrote)
This seems to be determined by the action_provision
file in the Vagrant data dir (.vagrant/
). It's usually located in the same folder as your Vagrantfile
.
So a crude workaround would be to set the ssh username in your Vagrantfile depending on if the file exists or not. I haven't been able to test this though, but if you just rename or remove the action_provision
file and go vagrant reload
it should provision again.