search for: macaddress_

Displaying 5 results from an estimated 5 matches for "macaddress_".

Did you mean: macaddress
2011 May 23
2
Variable interpolation challenge
...t found a good solution to. I want to use a variable as part of the name of a fact, but the interpolation doesn''t work as expected. I''ve allowed for passing the mac address into my define() but if it''s not provided I want to look it up via facter. if "$macaddress_${name}" { $final_hwaddr = "$macaddress_${name}" } I want Puppet to look up the value of macaddress_eth0 or whatever, but instead it returns the value of $name. How can I get the appropriate value? -- You received this message because you are subscribed...
2009 Dec 24
7
nested variables
Hi all! I have quation: how i may use nested variables/facts? For example, I have variable $iface. It''s variable declared in node brakets, and, use with defenition. iface may be eth0, eth1(Linux), em0, ... <freebsd>, ... is fact: facter | grep eth0 | grep mac macaddress_eth0 => 54:52:00:3D:CB:40 We don''nt know name of $iface in our module (to generate network settings), how we may use nested variables/facts? Syntax: $mac = ${$macaddress_${iface}} Does''nt work. In documentation i did''nt find answer for my quation... -- You receive...
2013 Nov 18
3
Is it possible to evaluate a string as a parameter name?
...names with the value of a class parameter to create and lookup the resulting fact''s value. Is that possible? For example, my class will take the parameter "my_default_nic" from beyond. So I know that as long as $my_default_nic exists on the client, then so will facts like macaddress_<NIC>, netmask_<NIC>, and ipaddress_<NIC>. So I''m looking for a way to formulate those fact names and evaluate the result... Is this at all possible? Thanks for your thoughts! $my_default_nic = ''eth1'' > $ip_method = ''static'' &gt...
2009 Sep 19
1
variable fact lookup
hi is it possible to use a variable to name the fact I am after eg define config_net ($eth_name) { $mac = $macaddress_$eth_name } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users...
2009 Oct 29
2
template issue: nested variables?
I need to do something like this node foo { $iface = pcn0 ... } # the template <%= network_<%= iface %> %>/<% netmask_<%= iface %> %> The idea being that a file would be built on the client holding the value of pcn0''s network/netmask Of course, I''m trying to avoid hard coding the interface name in order to keep my code portable. Thanks in advance