The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #9930

file resource should have concept of 'include' much like rsync

Added by Ken Barber over 4 years ago. Updated over 3 years ago.

Status:Needs More InformationStart date:10/06/2011
Priority:LowDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:2.7.4 Branch:
Keywords:file provider, rsync, include

We've Moved!

Ticket tracking is now hosted in JIRA:


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?


#1 Updated by Ken Barber over 4 years ago

  • Description updated (diff)

#2 Updated by Josh Cooper over 4 years 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 4 years 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.

Also available in: Atom PDF