Currently, the only way to share host entries between VMs is to use the autoconfigure functionality. But, this is limited as it only pulls in private_network definitions with static ip addresses. A more flexible system would be to declare a set of entries to export from a VM along with a set of entries to import. Combined with features such as #56 and #57, this would allow for things like:
config.vm.provision :hosts do |p|
p.exports = {
# Export global IP addresses for hosts in other compute environments to use
'global' => ['@vagrant_ssh', ['@vagrant_hostnames']],
# Export private IP addresses for other hosts within AWS to use
'aws' => ['@facter_ipaddress', ['@vagrant_hostnames']],
}
# Collect private IP addresses from other AWS hosts.
p.imports = ['aws']
end
Currently, the only way to share host entries between VMs is to use the
autoconfigure
functionality. But, this is limited as it only pulls inprivate_network
definitions with static ip addresses. A more flexible system would be to declare a set of entries to export from a VM along with a set of entries to import. Combined with features such as #56 and #57, this would allow for things like: