-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow non privileged user vagrant to run a shell provision #1370
Conversation
That'd be really great to have, please consider merging this. |
Yes, please - I need that feature, too. |
+1 I definitely need this feature! |
bump |
This actually would be greatly useful to be in master. Right now I actually need to drop out of provisioning to perform a deploy with capistrano. If this was here it'd be a nice and easy pattern to first deploy with Chef using Vagrant, and then have a final step which executes a local capistrano deploy. This is obviously only a single use case and just so happens to be the one that I have. But I am sure there are many other options we could consider. Executing as a separate role account other than vagrant? |
+1 some provisioning operations needs to be executed as non-root user, it would be good to have it in vagrant instead of doing sudo in the scripts |
👍 IMHO: might be you should add some acceptance test here? |
👍 For ssh agent forwarding and explicit sudo It seems that @mitchellh originally intended for the non-privileged It may be too late to change the default behavior, but an option like this would be useful. |
+1 this would really help. |
Merged. Enjoy! |
Sometimes, after provisioning the server, I need to make some initial configurations in the project, without superuser privileges. For example, bundle the project gems, import assets and/or db data from the integration server, etc. Some of these tasks are better performed by the user vagrant, and some of them don't even work when performed by root (because of ssh agent forwarding lost after sudo'ing and su'ing).
This pull request allows a shell provision by the unprivileged vagrant user: