Bug #9930
file resource should have concept of 'include' much like rsync
| Status: | Needs More Information | Start date: | 10/06/2011 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | file | |||
| Target version: | - | |||
| Affected Puppet version: | 2.7.4 | Branch: | ||
| Keywords: | file provider, rsync, include | |||
Description
So currently we have the ignore parameter which parallels to ‘exclude’ for rsync:
file { "/Users/ken/tmp/ignore/testcontent/":
ensure => directory,
mode => "0666",
source => "/Users/ken/tmp/ignore/sourcecontent",
ignore => "*.ignore",
recurse => true,
}
What would be nice is the converse of this … lets call it ‘include’ for now:
file { "/Users/ken/tmp/ignore/testcontent/":
ensure => directory,
mode => "0666",
source => "/Users/ken/tmp/ignore/sourcecontent",
include => "*.include",
recurse => true,
}
And it probably should behave the same way ie. take an array – support wildcard globing. And probably should allow mixing ‘ignore’ and ‘include’.
On a side-note ‘ignore’ is probably best aliased to ‘exclude’ in this case. But I’m getting ahead of myself.
What do people think?
History
#1
Updated by Ken Barber over 1 year ago
- Description updated (diff)
#2
Updated by Josh Cooper over 1 year ago
- Status changed from Unreviewed to Needs More Information
Hi Ken,
Just curious if there are specific use-cases you’re trying to solve with this option? Also, you might want to bring this up on the mailing list so others can provide feedback.
#3
Updated by Ken Barber over 1 year ago
- Priority changed from Normal to Low
As with a lot of my tickets, this was raised for some client during training – but unfortunately they aren’t watching the ticket so I can’t get them to devolve their use-case.
From memory it was to do with the fact they had a directory (and sub-directories) of *.conf files and they only wanted to copy them – there may have been other content but they wanted them to be ignored. So it was a whitelist versus blacklist copy use-case. Pretty obvious kind of case I would presume, but I haven’t really been asked for it that often (perhaps twice) or had a need for it myself so I can’t speak for demand.