Reputation: 57026
Vagrant version: 1.6.3
Vagrant plugins installed:
vagrant-hostsupdater (0.0.11)
vagrant-login (1.0.1, system)
vagrant-share (1.1.0, system)
vagrant-vbguest (0.10.0)
vagrant-vbox-snapshot (0.0.5)
My vagrant file defines a private and public network - The hosts updater plugin adds an /etc/hosts entry for the private network but not the public network - any solution to this? (other than manually entering it - i know its a static IP but i am lazy) - thanks
my Vagrantfile follows (which I am proud of, works perfectly) ...
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
IP_END = 88
HTTP_PORT = 8888
BOX_NAME = "hashicorp/precise32"
HOST_NAME = "precise32.com"
GUI = false
# vagrantup.com
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = BOX_NAME
config.vm.network "private_network", ip: "192.168.56.#{IP_END}"
config.vm.network "public_network", bridge: "wlan0", ip: "192.168.1.#{IP_END}"
config.vm.network "forwarded_port", guest: 80, host: HTTP_PORT
config.vm.hostname = HOST_NAME
# 'vagrant box outdated' forces a check update
config.vm.box_check_update = true
config.ssh.forward_agent = false
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
vb.gui = GUI
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
end
config.vm.provision "puppet" do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "site.pp"
end
end
Upvotes: 2
Views: 1848
Reputation: 10721
It looks like someone already submitted a pull request to the hostsupdater plugin: https://github.com/cogitatio/vagrant-hostsupdater/pull/47
I don't know how actively maintained this plugin is (last commit was October 2013). At a minimum you could implement the same code change from that pull request in your local copy of the plugin.
Upvotes: 2