Merge pull request #95 from bkon/feature/sudo-docs

Documentation on how to set up password-less sudo for this plugin.
This commit is contained in:
Paulo Bittencourt 2014-05-25 10:43:06 -04:00
commit b0182c1ca3
1 changed files with 13 additions and 2 deletions

View File

@ -92,6 +92,17 @@ config.hostmanager.ip_resolver = proc do |vm, resolving_vm|
end
```
Passwordless sudo
-----------------
Add the following snippet to the sudoers file (for example, to
```/etc/sudoers.d/vagrant_hostmanager```) to make it stop asking
password when updating hosts file (replace ```/home/user``` with your
actual home directory):
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /home/user/.vagrant.d/tmp/hosts.local /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE
Windows support
---------------