Last active
June 13, 2016 19:55
-
-
Save cromulus/5044b9558319769aaf0b to your computer and use it in GitHub Desktop.
Passwordless nfs and hostmanager for vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## add this to your /etc/sudoers file | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports | |
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports | |
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /Users/bill/.vagrant.d/tmp/hosts.local /etc/hosts | |
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE, VAGRANT_HOSTMANAGER_UPDATE | |
# for vagrant-hostmanager | |
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp <home-directory>/.vagrant.d/tmp/hosts.local /etc/hosts | |
%<admin-group> ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment