I'm trying to populate a config file with a MAC address for a specified ethernet adapter.
The name of the ethernet adapter (e.g. eth1) is a parameter of my defined type. When I try to populate a config file through puppet with an erb template which accesses the macaddress facter fact, that gives me the mac address for the eth0 interface, which is the wrong one (in this instance).
How can I create a variable in my defined type which takes the value of facter macaddress_ethernetinterface where ethernetinterface is defined by a parameter of the defined type?