On May 8, 2013, at 6:52 AM, Bret Wortman <bret.wort...@damascusgrp.com> wrote:
> What's the right/best way to indicate that a particular entry in a manifest > (a file in this case) depends on successful installation of over 30 packages, > all indicated in the same manifest? I could do this, but it seems cumbersome: > > package { 'pkg1': } > Package['pkg1'] -> File['file1'] > > package { 'pkg2': } > Package['pkg2'] -> File['file2'] > : > : > file { 'file2': > path => '/path/to/file2', > : > } > > There must be a better way that I'm just not seeing. Thanks! > > > Bret Wortman Bret, Puppet lets you use arrays to make your manifests more concise. In this case, if these 30 package resources differ only in name, i.e. all their parameters are the same except for the package name, then you can use this following to make the dependency declaration less cumbersome: package { [ "pkg1", "pkg2", . . "pkg30" ]: ensure => installed, before => File['file2'], } file { 'file2': ensure => file, path => "/path/to/file2", content => "I exist only after all 30 packages are installed.", } -- Peter -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.