Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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
share|improve this answer
    
Would you mind explaining how this solved the problem please. –  Iain Mar 29 '13 at 8:42
    
You're right. This won't solve, it's a workaroud. Edited –  Antonello Pasella Mar 29 '13 at 8:44
    
What I meant was can you explain a little what it does / why it helps, the bare link doesn't really do that. –  Iain Mar 29 '13 at 8:45
    
Edited, thanks for your help –  Antonello Pasella Mar 29 '13 at 8:53
    
thanks for the update –  Iain Mar 29 '13 at 8:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.