Re: [Puppet Users] nested variables workaround in templates

2011-01-20 Thread Jeff McCune
On Thu, Jan 20, 2011 at 1:52 AM, ScOut3R wrote: > Dear List, > > I consider myself a newbie and i'd like to ask the gurus how they > would approach the problem i'll describe here. I have a template and > inside it i'd like to configure more than one identical blocks. My > idea was to create a nest

[Puppet Users] nested variables workaround in templates

2011-01-20 Thread ScOut3R
Dear List, I consider myself a newbie and i'd like to ask the gurus how they would approach the problem i'll describe here. I have a template and inside it i'd like to configure more than one identical blocks. My idea was to create a nested hash inside an array but the templating system cannot und

Re: [Puppet Users] nested variables

2009-12-26 Thread Silviu Paragina
On 26.12.2009 20:10, Scott Smith wrote: > Silviu Paragina wrote: > >>> $mac = ${$macaddress_${iface}} >>> >>> >> Shouldn't this be ${macaddress_${iface}} ? >> >> > Have you tried that? Doesn't work for me in 0.25.1. > Not really, tested it now, and you are right, but there was

Re: [Puppet Users] nested variables

2009-12-26 Thread Scott Smith
Silviu Paragina wrote: >> $mac = ${$macaddress_${iface}} >> > Shouldn't this be ${macaddress_${iface}} ? > Have you tried that? Doesn't work for me in 0.25.1. -scott -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, s

Re: [Puppet Users] nested variables

2009-12-26 Thread Silviu Paragina
On 24.12.2009 11:33, sHaggY_caT wrote: > 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, ... > , ... > > is fact: > > facter | grep eth0

Re: [Puppet Users] nested variables

2009-12-24 Thread Mike Pountney
Have a look at the generate() and inline_template() functions, one of which should provide you with a workaround to your problem. There may be a more elegant solution though. On 24 Dec 2009, at 09:33, sHaggY_caT wrote: > Hi all! > > I have quation: how i may use nested variables/facts? For e

[Puppet Users] nested variables

2009-12-24 Thread sHaggY_caT
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, ... , ... is fact: facter | grep eth0 | grep mac macaddress_eth0 => 54:52:00:3D:CB:40 We don'