Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant-hostmanager don't support override feature ? #104

Open
harobed opened this issue Jun 12, 2014 · 1 comment
Open

vagrant-hostmanager don't support override feature ? #104

harobed opened this issue Jun 12, 2014 · 1 comment

Comments

@harobed
Copy link

harobed commented Jun 12, 2014

I've this configuration, with hostmanager configured only for "virtualbox"

Vagrant.configure("2") do |config|
    config.vm.hostname = "foobar"
    config.ssh.forward_agent = true

    config.vm.provider "virtualbox" do |v, override|
        override.vm.box = "debian-wheezy64"
        override.vm.box_url = "...."
        override.hostmanager.enabled = true
        override.hostmanager.manage_host = true
        override.hostmanager.ignore_private_ip = false
        override.hostmanager.include_offline = true
        override.hostmanager.aliases = ["foobar.example.com", "example.com"]

        override.cache.auto_detect = true
        override.vm.network :private_network, ip: "192.168.33.10"
    end
    config.vm.provider :lxc do |v, override|
        override.vm.box = "fgrehm/wheezy64-lxc"
        override.vm.box_url = "https://vagrantcloud.com/fgrehm/wheezy64-lxc"
    end
    config.vm.provider :lxc do |lxc|
        lxc.customize "network.type", "veth"
        lxc.customize "network.link", "lxcbr0"
        lxc.customize "network.hwaddr", "22:90:e8:45:3c:34"
    end
end

If I launch "vagrant up" on this configuration, I've no hostname configured in /etc/hosts

But it's work with this configuration :

Vagrant.configure("2") do |config|
    config.vm.hostname = "foobar"
    config.ssh.forward_agent = true
    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
    config.hostmanager.ignore_private_ip = false
    config.hostmanager.include_offline = true
    config.hostmanager.aliases = ["foobar.example.com", "example.com"]

    config.vm.provider "virtualbox" do |v, override|
        override.vm.box = "debian-wheezy64"
        override.vm.box_url = "...."

        override.cache.auto_detect = true
        override.vm.network :private_network, ip: "192.168.33.10"
    end
    config.vm.provider :lxc do |v, override|
        override.vm.box = "fgrehm/wheezy64-lxc"
        override.vm.box_url = "https://vagrantcloud.com/fgrehm/wheezy64-lxc"
    end
    config.vm.provider :lxc do |lxc|
        lxc.customize "network.type", "veth"
        lxc.customize "network.link", "lxcbr0"
        lxc.customize "network.hwaddr", "22:90:e8:45:3c:34"
    end
end

I think that vagrant-hostmanager don't support override feature ?

Best regards,
Stephane

@aaronsaray
Copy link

I have this same issue. I've tried using override and also just defining it in the individual machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants