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