-1

I'm using http://forge.puppetlabs.com/razorsedge/network but I can't configure it properly.

this is my puppetfile.pp

class network {
    static { "eth1":
        ipaddress  => "1.2.3.248",
        netmask    => "255.255.255.128",
        ensure     => "up",
    }
}

node default {
    include eth1
}

But won't work!

The doc says

network::if::static { "eth0":
  ipaddress  => "1.2.3.248",
  netmask    => "255.255.255.128",
  ensure     => "up",
}

may someone point me how to trnslate this :: in a puppet file?

Thanks!

Shane Madden
  • 114,520
  • 13
  • 181
  • 251

1 Answers1

1

I worked around with this Vagrantfile

I setup two cards (the default one and a second public one) the first with my usual conf and the second with a custom static IP

Vagrant.configure("2") do |config|
  config.vm.box = "precise32"

  config.vm.provider :virtualbox do |v|
    v.customize ["modifyvm", :id, "--memory", 256]
    v.customize ["modifyvm", :id, "--nictype1", "virtio"] # the main card (used for ssh and internal networking between host and guest)
    v.customize ["modifyvm", :id, "--nictype2", "virtio"] # a second card
    v.gui = true # for debug
  end


  config.vm.network :bridged, :bridge => "en0: Wi-Fi (Airport)", :adapter => 1 # the main card configuration
  config.vm.network :private_network, :ip => "192.168.2.100", :nictype => 'virtio', :adapter => 2 # the secondary card configuration with a static IP
end