Closed nyetsche closed 9 months ago
This would be such a great feature to have!
This PR has been marked stale because it has had no activity for 60 days. If you are still interested in getting this merged, please comment and we'll try to move it forward. Otherwise, it will be closed in 7 days.
This PR implements the option to each module of a list of files to delete after the copy into the local directory.
The use case is repositories/modules with "unwanted" information. In our environment all modules downloaded with
r10k
are checked into our main Puppet git repository. We want to skip files in our repo that we don't need, and do so in a repeatable way.Example
Puppetfile
with this feature:This downloads
puppetlabs-cron_core
, then removes the directory.github
, the directorylocales
, and the glob*/README_*.md
.The module on filesytem without this option:
The module on the filesytem with this option as show above:
This option uses
Dir.glob
for matching: https://ruby-doc.org/core-2.6.3/Dir.html#method-c-globIf a directory is listed, the entire directory is removed: (
rm -rf
).Not setting
extra_delete: ...
is equivalent toextra_delete: []
, which will cause no files to be deleted.