Hi,

lets say I have a small class that simply extracts a given ZIP archive
into a destination directory, using a version string passed in as class
parameter to identify both the archive and the destination:

class foo ($version = undef) {
    ...
}

If the archive is extracted manually, I can easily extract multiple
different versions next to each other, so that I get (for example):

/opt/foo/1/
/opt/foo/2/
...
/opt/foo/n/

However, in Puppet, I can't do this for the same node:

class {'foo': version => '1'}
class {'foo': version => '2'}
class {'foo': version => '3'}

to get multple versions extracted.

I currently achieve this by doing multiple sequential Puppet runs with
different values for $version.

There must be a better way to do this. I thought about passing in the
versions as an array, but Puppet has no loops. Do I really need to write
a custom type and provider for this?

Thanks...

    Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 1596666 (Ansage) 1149
*Email*: d...@recommind.com <mailto:d...@recommind.com>
*Skype*: dirk.heinrichs.recommind
www.recommind.com <http://www.recommind.com>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/54A6561F.7020707%40recommind.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to