No commit activity in last 3 years
No release in over 3 years
Extends puppet-lint to ensure file resources do not have recurse enabled.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.1, < 3.0
 Project Readme

puppet-lint recurse file check

Extends puppet-lint to ensure that file resources do not have recurse enabled. This can lead to performance issues in Puppetserver and PuppetDB when there are thousands of subdirectories or files that are managed. It is suggested to use an alternate approach for managing those directories.

This plug-in to puppet-lint will flag the a file resource that has recurse => true similar to the following.

  file { '/tmp/installer':
    ensure => absent,
    recurse => true,
  }

Or something like the following.

  file { '/data':
    owner => 'root',
    recurse => true,
  }

While the code above is functional, it will create a resource event for each file or directory under the /tmp/installer directory when it is being removed. This artificially bloats the report as the number of files increases. We have seen this done with directories of hundreds or thousands of files, which has created reports of over 256MB. An exec resource may be a better solution for this type of file management.

Installation

To install this for the local puppet-lint command line utility it can be installed with the following.

gem install puppet-lint-recurse_file-check

To use this plug-in with bundler, add the following line to your Gemfile.

gem 'puppet-lint-recurse_file-check'

and then run bundle install.

Usage

This plug-in provides a new check to puppet-lint. The following is the output which will be shown.

recurse file resources can cause decreased performance