Feature #48

Make filenames support globbing

Added by Luke Kanies almost 5 years ago. Updated about 1 year ago.

Status:Accepted Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:file
Target version:unplanned
Affected version:0.24.8 Branch:
Keywords:
Votes: 0

Description

File objects should be able to support globbing, something like this:

file { “/var/apache/*/logs”: owner => httpd }

It’ll be a bit strange to implement, because you’d have a parent file object that wouldn’t map directly to a real file and thus would have no states, but its children would all be real files.

History

Updated by Luke Kanies over 3 years ago

This requires the file type to generate resources capable of creating the parent directories, and the resources must be applied by the transaction before the file itself.

I expect it will also require an extra parameter to specify whether parent directories should be created; or maybe just ‘recurse => upward’ or something.

Updated by Luke Kanies over 3 years ago

Oops; for some reason I read this as #86.

This is much easier — just use ‘eval_generate’ to generate the files that match the glob. The only real hard part is going to be making the globbing file itself never do anything (i.e., you’ll have a top-level file that generates a bunch of files that do work, but the top-level file’s only job is to generate the other files).

Updated by Redmine Admin about 2 years ago

  • Status changed from 1 to Accepted

Updated by James Turnbull about 1 year ago

  • Assigned to deleted (Puppet Community)
  • Affected version set to 0.24.8

Also available in: Atom PDF