On Tuesday, January 15, 2013 8:40:56 AM UTC-6, Ygor wrote: > > I have one older server where the physical NIC port for eth0 won't hold > the CAT5 cable in place, so I use the other NIC port, eth1, and have eth0 > disabled/turned off > > Facts ipaddress and netmask accurately duplicate ipaddress_eth1 and > netmask_eth1, but macaddress is a duplicate of macaddress_eth0 > > I was expecting the same mechanism that makes ipaddress === ipaddress_eth1 > would make macaddress === macaddress_eth1 > > Any clues ? > > An ethernet interface has a MAC address even when it is disabled, but not an IP address or netmask. The behavior you expected might be an improvement over Facter's current behavior, but Facter is not inherently wrong now. You could consider filing an RFE.
In any event, the unadorned network facts such as 'ipaddress', 'netmask', and 'macaddress' have always been a bit problematic, as their definitions are not very useful. Especially for multi-homed systems, there is no single true IP address, netmask, or MAC address, regardless of what the existence of those facts implies. For multi-NIC systems there is no single, true MAC address even if the system is not multi-homed. In the mean time, you should be able to write a custom function or inline template with which you select from among the macaddress_* facts the one for the interface whose IP address matches the unadorned 'ipaddress' fact, by correlating macaddress_* with ipaddress_*. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Awd0cVJ4TR0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.