[Puppet Users] Templating question:

2011-09-24 Thread Peter Berghold
I thought I read in some documentation somewhere that for array variables you had a means of setting up a conditional for "last element". For instance class foo { $hosts=['hosta','hostb','hostc'] file { some-config : path=>"/s/ome/path/2[image: Call phone]/ In

Re: [Puppet Users] Templating question

2011-04-15 Thread Brian Gallew
That would undoubtedly have been a neater solution. I may well switch to using that. Thanks! On Fri, Apr 15, 2011 at 1:48 AM, Felix Frank < felix.fr...@alumni.tu-berlin.de> wrote: > On 04/13/2011 04:24 AM, Ben Hughes wrote: > > On Tue, Apr 12, 2011 at 07:20:24PM -0700, Brian Gallew wrote: > > >

Re: [Puppet Users] Templating question

2011-04-15 Thread Felix Frank
On 04/13/2011 04:24 AM, Ben Hughes wrote: > On Tue, Apr 12, 2011 at 07:20:24PM -0700, Brian Gallew wrote: > >> I ended up doing something even uglier (and probably stupider). I created >> two sub-classes of jumpstart: jumpstart::mirrorroot and jumpstart::zfsroot, >> and each one just sets a varia

Re: [Puppet Users] Templating question

2011-04-12 Thread Ben Hughes
On Tue, Apr 12, 2011 at 07:20:24PM -0700, Brian Gallew wrote: > I ended up doing something even uglier (and probably stupider). I created > two sub-classes of jumpstart: jumpstart::mirrorroot and jumpstart::zfsroot, > and each one just sets a variable ($target) and the uses the template. It's >

Re: [Puppet Users] Templating question

2011-04-12 Thread Brian Gallew
On Tue, Apr 12, 2011 at 6:39 PM, Ben Hughes wrote: > > Sadly, my introspection-fu seems to be lacking and I'm unable to figure > it out. Any help? > > Not easily. The only way I was able to find mention of it at all was > with the horrible voodoo of a template of: > > <%= require 'pp' ; pp @__sc

Re: [Puppet Users] Templating question

2011-04-12 Thread Ben Hughes
On Tue, Apr 12, 2011 at 02:22:03PM -0700, Brian Gallew wrote: > Sadly, my introspection-fu seems to be lacking and I'm unable to figure it > out. Any help? Not easily. The only way I was able to find mention of it at all was with the horrible voodoo of a template of: <%= require 'pp' ; pp @__s

[Puppet Users] Templating question

2011-04-12 Thread Brian Gallew
OK, I'm trying to do something (apparently) stupid. Here's the relevant fragment of my manifest: "/jumpstart/Begin/rootmirror.beg": require => File["/jumpstart/Begin"], content => template("jumpstart/standard.beg.erb"); "/jumpstart/Begin/standard.beg": require => F