> The trained eye can probably see immediately why this doesn't work - it > tries to instantiate two copies of Python::Package[mock-0.6.0], each > with different $virtualenv parameters. > > I think I could make this particular process work if I could qualify the > Python::Package resource names, and then un-qualify them to figure out > what package to install and what virtualenv to install it in. Then I > would have > Python::Package[/tools/virtualenv-1|mock-0.6.0] > Python::Package[/tools/virtualenv-2|mock-0.6.0] > > In the python::package define, I could split $title into $virtualenv and > $pkg easily enough with regsubst(). However, how can I take an array of > bare package names and prepend the virtualenv name and "|" to each one?
Hi, good thinking. Although this is quite evil, I've recently done the same to manage a swarm of git clones. The good thing about regsubst is that it can be applied to arrays, yielding an array of mangled strings. So my manifests contains (in a define) something like $my_repos = regsubst($repos, "\$", "-$name") my_git_clone { $my_repos: ... } where $repos is an array parameter. If anyone has a fundamentally better suggestion, I'm certainly game. Cheers, Felix -- 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.