vagrant-hostmanager
vagrant-hostmanager copied to clipboard
Completely exclude a (single) box of being included
By setting hostmanager.disabled inside a config.vm.define block.
Doesn't hostmanager.enabled = false work?
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.
Is there still any interest in this functionality?
There is from me
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?