Skip to content

Commit

Permalink
Merge pull request #82 from cogitatio/develop
Browse files Browse the repository at this point in the history
Fixes #28
  • Loading branch information
cgsmith committed Nov 9, 2015
2 parents 6793417 + 9af3c3f commit 66d39f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ Example:

## Passwordless sudo

Add the following snippet to the sudoers file (for example, to `/etc/sudoers.d/vagrant_hostupdater`) to make it
Add the following snippet to the top of the sudoers file using `sudo visudo`. It will make vagrant
stop asking password when updating hosts file:

# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
%admin ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE


## Installing development version
Expand All @@ -87,6 +88,9 @@ vagrant plugin install vagrant-hostsupdater-*.gem

## Versions

### 1.0.1
* Bugfix: Fixing `up` issue on initialize [#28](/../../issues/28)

### 1.0.0
* Stable release
* Feature: Added `skip` flag [#69](/../../issues/69)
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-hostsupdater/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Plugin < Vagrant.plugin('2')

action_hook(:hostsupdater, :machine_action_up) do |hook|
hook.prepend(Action::RemoveHosts)
hook.after(Action::RemoveHosts, Action::UpdateHosts)
hook.after(Vagrant::Action::Builtin::SetHostname, Action::UpdateHosts)
end

action_hook(:hostsupdater, :machine_action_provision) do |hook|
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-hostsupdater/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module VagrantPlugins
module HostsUpdater
VERSION = "1.0.0"
VERSION = '1.0.1'
end
end

0 comments on commit 66d39f0

Please sign in to comment.