Hi,

I would like to create network interfaces with puppet.
I have
define network_interface::managed_interface(
  $device='',
  $gateway='',
  $hostname='',
  $hwaddr='',
  $ipaddr='',
  $netmask='',
  $network='',
  $up=true,
){

and
class network_interface::create_interface (
  $device = hiera(....)',
){
  managed_interface { $device:
    device  => $device,
    ipaddr  => $ipaddr,
    netmask => $netmask, 
  }
}

and hiera yaml file:
network_interface:
  eth0:
    ipaddr: 10.112.67.40
    netmask: 255.255.0.0
  eth1:
    ipaddr: 10.15.67.40
    netmask: 255.255.0.0

Now I don't know how to read the hiera values in the class 
network_interface::create_interface. The interface names can be different.
Can some please help me?

Best regards
Andreas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b3298b5f-0fd0-48fa-9936-eea3a1719add%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to