I've done a similar thing in my redhat network template, e.g.:

DEVICE=<%= device %>
BOOTPROTO=static
IPADDR=<%= eval("ipaddress_" + device) %>
NETMASK=<%= eval("netmask_" + device) %>
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
HWADDR=<%= eval(" macaddress_" + device) %>
GATEWAY=<%= gateway %>

Hopefully this helps,
Ohad


On Fri, Oct 30, 2009 at 4:52 AM, windowsrefund <windowsref...@gmail.com>wrote:

>
> 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 for any tips
> >
>

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to