Hello, I want to vitualize a resources - but want to realize an array of resources... somthing like: @file { $myarray : ensure => directory, ... } Can I realize the resources with: File <| title == $myarray |> ? Thanks, -Roy -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Not sure if this works - using the expression: var == array doesn''t really make sense when you think about it as its trying to directly compare a string with an array (which should fail). If there was an ''in'' expression it would make more sense. Of course this is academic. Because you could just tag the resources, and search for the tag instead. @file { $myarray: ensure => directory, tag => "myfiles" ... } File <| tag == "myfiles" |> It should do the same trick. ken. On Apr 13, 11:39 pm, Roy Nielsen <r...@lanl.gov> wrote:> Hello, > > I want to vitualize a resources - but want to realize an array of > resources... > > somthing like: > > @file { $myarray : > ensure => directory, > ... > > } > > Can I realize the resources with: > > File <| title == $myarray |> > > ? > > Thanks, > -Roy-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> @file { $myarray: > ensure => directory, > tag => "myfiles" > ... > > } > > File <| tag == "myfiles" |>Or I think this will work also, probably close to your first requirement: @file { $myarray: ensure => directory, } realize(File[$myarray]) -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks Ken, I''ll give it a shot. Regards, -Roy On 4/14/10 3:51 AM, Ken wrote:>> @file { $myarray: >> ensure => directory, >> tag => "myfiles" >> ... >> >> } >> >> File<| tag == "myfiles" |> >> > Or I think this will work also, probably close to your first > requirement: > > @file { $myarray: > ensure => directory, > } > > realize(File[$myarray]) > >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 4/14/10 3:51 AM, Ken wrote:>> @file { $myarray: >> ensure => directory, >> tag => "myfiles" >> ... >> >> } >> >> File<| tag == "myfiles" |> >> > Or I think this will work also, probably close to your first > requirement: > > @file { $myarray: > ensure => directory, > } > > realize(File[$myarray]) > >Hello Ken, I used the: realize(File[$myarray]) - that worked, Thanks! -Roy -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.