+1 on that. exec a shell command. Look at it this way: How can you get the list of files without running a shell command ? Short answer: You cannot, so make it a chmod instead of an ls command and you are done.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "jcbollinger" <john.bollin...@stjude.org> To: puppet-users@googlegroups.com Sent: Friday, August 2, 2013 9:03:21 AM Subject: [Puppet Users] Re: Wildcards in file resourses -- yet another time On Friday, August 2, 2013 3:39:32 AM UTC-5, Ivan Lysov wrote: Hi All! I want to grant spetial permissions on some core files. So it would be nice to use something like file { "/var/lib/monitorium/core*" : mode => 0644, } But that obviously doesn't work. Any people with the same problem i've googled used some workarounds like managing directories recursively or writing more complicated scripts. I can't manage the whole directory because of many other files inside and i don't want to extrabloat my manifests. What should i do? If you imagine declaring a single resource of a built-in type that encompasses multiple files inside a given directory, then that can only be structured as a recursive File resource aimed at the directory. Non-recursive Files always represent exactly one file / directory / symlink. Unfortunately, however, Puppet does not support what you are asking. The 'ignore' parameter is as close as it comes: with that you could manage all files in a given directory except those matching some glob, but you want the opposite selection criterion. As far as I can see, your best bet for a Puppet-based solution is an Exec. John -- 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 . For more options, visit https://groups.google.com/groups/opt_out . -- 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. For more options, visit https://groups.google.com/groups/opt_out.