There are two cases during our current dev box provisioning script that we prompt for a password. I'm investigating moving to vagrant for dev environment setup but I'm kind of stuck with how to go about this part. Is there a way to prompt for user input during vagrant up, and then apply the input received within the guest VM?
Asked
Active
Viewed 893 times
2
-
vagrant recommends to use key-based authentication rather than a password so most of the boxes you'll find will use this mechanism. If you build your own box, you won't insert ssh key and will enable password authentication only so you could use your setup – Frederic Henri Aug 02 '17 at 15:47
-
Hi Frédéric Henri and thanks for commenting but my question isn't about SSH it is about things like access to our internal Maven repositories and to create users on the box to run things like Tomcat under. – Scott Shipp Aug 02 '17 at 16:15
-
ok I completely misunderstood the question, as it mention `vagrant up` a lot I thought it was to boot the VM but the question will be better if it mentions the provisioning steps. There's no really good solution for this, you can check [this answer](https://stackoverflow.com/a/36933462/4296747) with the reference/reason it cannot work with input http://vagrant.1086180.n5.nabble.com/bootstrap-sh-pause-for-input-after-each-command-td1399.html – Frederic Henri Aug 02 '17 at 16:33
-
No worries! I could have been clearer. Thanks for the note! I will just make Vagrant responsible for creating the VM and getting software installed, but for actual dev environment configuration, I can have the developers just vagrant ssh onto the box and run a setup script. – Scott Shipp Aug 02 '17 at 16:56