vagrant-hostmanager icon indicating copy to clipboard operation
vagrant-hostmanager copied to clipboard

Completely exclude a (single) box of being included

Open vStone opened this issue 12 years ago • 5 comments
trafficstars

By setting hostmanager.disabled inside a config.vm.define block.

vStone avatar May 02 '13 19:05 vStone

Doesn't hostmanager.enabled = false work?

b2jrock avatar Jun 13 '13 00:06 b2jrock

I think hostmanager.enabled = false works fine if you are talking about multiple independent Vagrantfile's being brought up at the same time, but it does not work within a a vm.define block of a multi-box Vagrantfile.

Test Vagrantfile

bdcribbs avatar Nov 16 '13 00:11 bdcribbs

Is there still any interest in this functionality?

pbitty avatar Jan 01 '14 20:01 pbitty

There is from me

vStone avatar Jan 02 '14 06:01 vStone

I don't think it would be too difficult to add this functionality while keeping the config simple and backward-compatible.

When I think of the semantics of 'including a box', I see two stages where a machine can be included:

  • when building the list of host file entries used in every hosts file (making the machine visible to other guests)
  • when managing the host file in the (guest) machine itself (making other guests visible to the machine)

For your use-case, do you want to exclude the machine from both stages, so it's completely out of the picture?

I think we could add a machine-level config option for this, like include_guest and have it default to true. Then you could exclude a machine by setting this to false in its own definition. This should keep things backward-compatible?

What do you think?

pbitty avatar Jan 02 '14 21:01 pbitty