Puppet: System Administration Automated

Support

Ticket #48 (new enhancement)

Opened 3 years ago

Last modified 2 years ago

Make filenames support globbing

Reported by: luke Assigned to: community
Priority: normal Milestone: unplanned
Component: file Version:
Severity: normal Keywords: files
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Easy

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.

Change History

02/25/06 00:04:21 changed by luke

  • type changed from defect to enhancement.

04/05/07 19:05:41 changed by luke

  • specification set to Unnecessary.
  • patch set to None.
  • complexity set to Medium.
  • milestone set to unplanned.
  • keywords set to files.
  • approval set to Approved.
  • compatibility set to Limited.
  • stage set to Accepted.

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.

04/05/07 19:16:26 changed by luke

  • owner changed from luke to community.
  • complexity changed from Medium to Easy.
  • compatibility changed from Limited to Full.

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).