From 8e5510582ae2d6f9c9035050edf880184b9f11cc Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 8 Nov 2015 20:47:17 -0600 Subject: [PATCH 1/5] Fixing first vagrant up issue #28 --- lib/vagrant-hostsupdater/plugin.rb | 2 +- lib/vagrant-hostsupdater/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-hostsupdater/plugin.rb b/lib/vagrant-hostsupdater/plugin.rb index 428d647..757cb6b 100644 --- a/lib/vagrant-hostsupdater/plugin.rb +++ b/lib/vagrant-hostsupdater/plugin.rb @@ -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| diff --git a/lib/vagrant-hostsupdater/version.rb b/lib/vagrant-hostsupdater/version.rb index 8ec37e8..2b4a72e 100644 --- a/lib/vagrant-hostsupdater/version.rb +++ b/lib/vagrant-hostsupdater/version.rb @@ -1,5 +1,5 @@ module VagrantPlugins module HostsUpdater - VERSION = "1.0.0" + VERSION = '1.0.1' end end From 07409ae4c0ff9358e0f92c75d30a689b4fb3b6be Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 8 Nov 2015 21:02:38 -0600 Subject: [PATCH 2/5] Updating passwordless sudo documentation --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae7ea80..8d0211a 100644 --- a/README.md +++ b/README.md @@ -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 From 27ac1f9e79d61dc4200f380155539db83caf2ae7 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 9 Nov 2015 07:11:41 -0600 Subject: [PATCH 3/5] Updating documentation to show 1.0.1 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8d0211a..45e67de 100644 --- a/README.md +++ b/README.md @@ -88,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) From 2f12f8d0da16dd395b3477d927dbeee1222ec54b Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 9 Nov 2015 07:14:55 -0600 Subject: [PATCH 4/5] Updated plugin.rb to fix #28 --- lib/vagrant-hostsupdater/plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-hostsupdater/plugin.rb b/lib/vagrant-hostsupdater/plugin.rb index 757cb6b..2d2e57d 100644 --- a/lib/vagrant-hostsupdater/plugin.rb +++ b/lib/vagrant-hostsupdater/plugin.rb @@ -18,7 +18,7 @@ class Plugin < Vagrant.plugin('2') action_hook(:hostsupdater, :machine_action_up) do |hook| hook.prepend(Action::RemoveHosts) - hook.after(Vagrant::Action::Builtin::SetHostname, Action::UpdateHosts) + hook.after(Vagrant::Action:: end action_hook(:hostsupdater, :machine_action_provision) do |hook| From 59efd30814849aaab159600b21c3cfbda5133dc4 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 9 Nov 2015 08:13:22 -0600 Subject: [PATCH 5/5] Updated plugin.rb to fix #28 Fixing the cat from running on the keyboard --- lib/vagrant-hostsupdater/plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-hostsupdater/plugin.rb b/lib/vagrant-hostsupdater/plugin.rb index 2d2e57d..757cb6b 100644 --- a/lib/vagrant-hostsupdater/plugin.rb +++ b/lib/vagrant-hostsupdater/plugin.rb @@ -18,7 +18,7 @@ class Plugin < Vagrant.plugin('2') action_hook(:hostsupdater, :machine_action_up) do |hook| hook.prepend(Action::RemoveHosts) - hook.after(Vagrant::Action:: + hook.after(Vagrant::Action::Builtin::SetHostname, Action::UpdateHosts) end action_hook(:hostsupdater, :machine_action_provision) do |hook|