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