The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #9930

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

Added by Ken Barber almost 3 years ago. Updated about 2 years ago.

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

0%

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

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


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 almost 3 years ago

  • Description updated (diff)

#2 Updated by Josh Cooper almost 3 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 almost 3 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