Commit Graph

99 Commits

Author SHA1 Message Date
Matthew Hopkins 3051f4b3e3 only update hosts file if it has changed - for both host and guest 2014-02-24 14:14:57 -05:00
Paulo Bittencourt 93fd353135 Merge pull request #64 from sstrato/patch-1
only first private_network is used
2014-02-20 20:44:34 -05:00
Paulo Bittencourt 4ba0d56bdb Merge pull request #52 from pbitty/hosts_file_sync
Sync state with hosts file in blocks
2014-02-20 20:03:40 -05:00
Paulo Bittencourt 8f041f5ef6 make get_machines return machine instances instead of machine names 2014-02-17 16:32:56 -05:00
Paulo Bittencourt ab5d82275a sync hosts file state in blocks instead of lines 2014-02-17 16:32:52 -05:00
Paulo Bittencourt ef410e6c04 Merge pull request #62 from elyast/hotfix/1.3.0_ip_resolver
Allow ip resolver to know for which vm other current vm's IP is being resolved
2014-01-23 18:30:06 -08:00
Andrew Yongjoon Kong 2498e053f9 only first private_network is used
this will prevent using last private_network for the hostname
2014-01-16 17:18:49 +09:00
Lukasz Jastrzebski 566d1f2e3b tweaking couple of code review suggestions 2014-01-10 20:51:50 -08:00
Lukasz Jastrzebski 1b63859a57 adding current_machine to resolution 2013-12-19 16:08:31 -08:00
Lukasz Jastrzebski 24dc1c8ed6 fixing incorrect merge 2013-12-19 14:25:05 -08:00
Lukasz Jastrzebski eea9c82d03 Merge branch 'hotfix/1.3.0' 2013-12-19 14:20:55 -08:00
Paulo Bittencourt dd924d00a4 Merge pull request #57 from elyast/master
fixing custom ip resolver
Closes #54.
2013-12-17 22:05:11 -08:00
Lukasz Jastrzebski ed0fe89dd0 fixing etc hosts handling to avoid duplicates 2013-12-15 17:11:51 -08:00
Lukasz Jastrzebski 3f8e617ba7 fixing custom ip resolver 2013-12-15 14:01:08 -08:00
Paulo Bittencourt cb832156f3 Bump for release 2013-11-30 01:44:22 -05:00
Paulo Bittencourt 76f8e17f92 Merge pull request #51 from bf4/add_license_to_gemspe
[#28] Add license to gemspec, is MIT
2013-11-22 09:16:16 -08:00
Benjamin Fleischer 3b4a55e4a8 [#28] Add license to gemspec, is MIT 2013-11-22 07:13:36 -06:00
Paulo Bittencourt af19868ee6 Merge pull request #48 from pbitty/windows_elevate_privileges
elevate privileges in Windows host if necessary
2013-11-20 20:19:27 -08:00
Paulo Bittencourt 1caa3c373b update README with Windows support information 2013-11-20 23:04:37 -05:00
Paulo Bittencourt 3edc923b22 use rbconfig for detecting Windows 2013-11-20 22:15:39 -05:00
Paulo Bittencourt d2b2e00939 elevate privileges in Windows host if necessary 2013-11-20 22:15:37 -05:00
Paulo Bittencourt 02758e32f0 fix indentation (using spaces instead of tabs) 2013-11-18 12:47:10 -05:00
Paulo Bittencourt a426b8503a Merge pull request #49 from Tpbrown/git-bash-windows
Support Cygwin and MinGW on Windows.  Fixes #24
2013-11-18 09:40:56 -08:00
Bryan Cribbs 9bc81fc318 Merge branch 'sevos-enable_using_private_ips_from_aws' 2013-11-15 20:17:14 -06:00
Bryan Cribbs 3abecb0088 Merge sevos pull/15 into master
Merge branch 'enable_using_private_ips_from_aws' of
https://github.com/sevos/vagrant-hostmanager into master.

Conflicts:
	lib/vagrant-hostmanager/config.rb
	lib/vagrant-hostmanager/hosts_file.rb
2013-11-15 20:15:10 -06:00
Bryan Cribbs cac3589451 Merge pull request #46 from emyl/provider-to-sym
Properly convert provider command option to symbol
2013-11-15 17:08:47 -08:00
Bryan Cribbs 6c5f3ed972 Merge pull request #45 from bdcribbs/fix/44
Handle destroyed machines in update_file.  Fixes #44
2013-11-15 16:13:38 -08:00
Tim Brown 8f3dd06d8e Use :SystemRoot to detect Windows, including git-bash. Also use :Windir to ensure we get correct hosts file path 2013-11-11 14:10:11 -08:00
Emiliano Ticci 2a6cf09b1d Properly convert provider command option to symbol 2013-11-04 17:19:29 +01:00
Bryan Cribbs c53452b927 #44 Handle destroyed machines in update_file
Keep track of machines that have been destroyed (they have a nil id).
Do not include them when updating the hosts file.

Since it is impossible to match on id, this is accomplished by matching
the exact ip / hostname / alias.  If any of these have been altered
since the entry was created the entry will not be removed from the hosts
file.

Potentially, this could be relaxed to only match on ip / hostname pairs.
2013-11-02 16:00:23 -05:00
Shawn Dahlen 5e785f819d Bump for release 2013-10-04 10:05:11 -04:00
Shawn Dahlen 0b3b8ae2e7 Merge pull request #41 from robcoward/master
Added support for windows guests
2013-10-04 07:04:05 -07:00
Rob Coward b935e4002f Changed test for windows guest to use the same as the vagrant-windows plugin 2013-10-03 14:51:49 +01:00
Rob Coward c555a98de3 Added support for windows guests 2013-10-03 14:16:53 +01:00
Shawn Dahlen 4e198ed65d Bump for release 2013-10-02 07:42:51 -04:00
Shawn Dahlen d7f6941303 Merge pull request #40 from cliles-capario/solaris-support
Support Solaris hostfile in /etc/inet/hosts
2013-10-02 04:41:50 -07:00
Chris Liles b281681b11 adding solairs support 2013-10-01 13:17:18 -07:00
Shawn Dahlen 86f4d73387 Bump version for release. 2013-09-09 17:53:34 -04:00
Shawn Dahlen 58d47cfb8f Merge pull request #38 from mosaicxm/feature/current-vagrantfile-updates
only remove lines for the current vagrantfile
2013-09-09 14:52:06 -07:00
S. Brent Faulkner cb9832a399 only remove lines for the current vagrantfile 2013-09-03 15:32:54 -04:00
Shawn Dahlen 3054b2d98b Merge pull request #36 from itaymendel/master
fixed windows compatibility issues for the hosts file
2013-08-29 05:56:59 -07:00
itaymendel 1d161d0582 fixed windows compatibility issues for the hosts file
i have added a 'if windows' for the update_host method, to deal with a windows host machine.
sometimes i had an error on line 17, because the file was no longer there (maybe mv removed it?), so i just added a exception block to catch it. it does nothing, but now it is working for me.
2013-08-28 08:58:46 +03:00
Shawn Dahlen 436b171f53 Remove suspend, resume, and halt hooks.
This commits removes hooks that introduced dependencies to machine state
and therefore broke compatibility with all Vagrant providers.
2013-08-22 17:12:33 -04:00
Shawn Dahlen 4136b1ee7b Merge pull request #35 from jeremiahsnapp/check_global_enabled
Check global.enabled instead of machine.enabled
2013-08-22 13:46:19 -07:00
Shawn Dahlen f189fb68cf Fix hardcoding of active state.
This commit queries the environment for active machines instead of
relying on a certain machine state. This fixes support for other Vagrant
providers.
2013-08-22 16:45:39 -04:00
Shawn Dahlen f3e2708144 Bump for release. 2013-08-15 11:19:38 -04:00
Shawn Dahlen 2f1e3e0b63 Merge pull request #34 from jeremiahsnapp/define_active_as_running
Add hooks & define active/offline as running/not
2013-08-15 08:15:51 -07:00
Jeremiah Snapp f8baff2186 Check global.enabled instead of machine.enabled
update_all.rb checks if @machine.config.hostmanager.enabled is set to true.
The default value of @enabled is set to false by config.rb.
If the Vagrantfile has a global value of true for enabled but it sets vm
specific hostmanager options, such as when specifying hostmanager.aliases,
then the @machine.config.hostmanager.enabled will default to false and
hostmanager will not think it is enabled.

Check @global_env.config_global.hostmanager.enabled instead.
2013-08-12 17:41:38 -04:00
Jeremiah Snapp 1cb7fc9b57 Add hooks & define active/offline as running/not
Hosts entries shouldn't only be added/removed upon creation/destruction.
The persistence of /etc/hosts entries while a vm is in a halted or
suspended state is undesirable especially when hostmanager.manage_host
is set to true. That would mean your host's /etc/hosts would retain
entries even if you aren't currently using a vm.  The vm would have to
be destroyed for the entry to be removed from the host's /etc/hosts.

Adding hooks for halt, resume and suspend commands and changing the
concept of active and offline states from created or not_created to
running or not running allows a vm's entry to be added when it is put
in a running state and removed when it is not running.

The hostmanager.include_offline can be set to true if one still desires
to have not_created or not running machines' entries included in the
/etc/hosts file.
2013-08-12 12:16:40 -04:00
Shawn Dahlen 063c749fe5 Fix issue #26.
This commits adds a check in the config validation to allow for
UNSET_VALUE for boolean attributes. This is required when finalize is
not executed.
2013-07-19 11:40:01 -04:00