Commit Graph

11 Commits

Author SHA1 Message Date
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
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 4ce7cd498e Finish support for managing host /etc/hosts file.
This commit moves logic into action middleware and ensures that
config validation is executed when the hostmanager command is called.
2013-06-20 12:54:20 -04:00
Jan Vansteenkiste 0b3e60cb5d Added new include_offline configuration item 2013-05-07 16:06:04 +02:00
Jan Vansteenkiste cae5f6be7d Add Hostmanager as a provisioner. 2013-05-02 20:15:10 +02:00
Shawn Dahlen 264856478f Fix config validation.
This commit fixes issue #5. Additionally, it deactivates the auto
update behavior by default. Users must set `enabled` to true to activate
auto updates for the hosts file.
2013-04-27 08:13:26 -04:00
Shawn Dahlen 8a07234527 Fix documentation 2013-04-17 09:57:53 -04:00
Mirosław Nagaś 5f384570ca update README 2013-04-17 12:24:45 +02:00
Shawn Dahlen 33c391cfe0 Implement check for already active machine.
This commit re-instates the behavior of auto-updating the
/etc/hosts file on each active machine. If machine is already
active, no update will occur.
2013-04-08 13:20:22 -04:00
Shawn Dahlen 39c197d7cc Implement command to update /etc/hosts files.
This commit disables automatic updates by default instead preferring
the user to execute the hostmanager sub-command. The user can enable
auto updates via configuration.
2013-04-06 08:59:07 -04:00
Shawn Dahlen 665b96c044 Proof-of-concept support for managing /etc/hosts.
Hooks into the up and destroy commands to manage changes to
the /etc/hosts file on active machines.
2013-03-27 15:38:08 -04:00