Forge Home

recursive_directory

Module that will recusively interpolate directories of templates to the catalog

24,054 downloads

22,251 latest version

3.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.10.2 (latest)
  • 0.10.1
released May 21st 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'mozrtucker-recursive_directory', '0.10.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mozrtucker-recursive_directory
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mozrtucker-recursive_directory --version 0.10.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

mozrtucker/recursive_directory — version 0.10.2 May 21st 2015

puppet-recursive_directory

Puppet module to allow for files to be created recursively from a folder of templates

The benefit here is that you no longer need to define file resources for each and every template file

This should help to substantially shorten manifests that include lots of template files

usage

recursive_directory {'some_unique_title':
      source_dir => 'custom_module/source_dir',
      dest_dir   => '/tmp',
      file_mode  => '0644',
      dir_mode   => '0700',
      owner      => 'root',
      group      => 'root'
}

This will copy all files from <module_path>custom_module/templates/source_dir folder and interpolate variables the same as when using the template() function inside of the manifest itself and put them into /tmp

parameter documentation

source_dir

The module_name followed by a subfolder inside of <module_name>/templates If source_dir is simply the modulename, recursive_directory will interpolate and create file resources for all files in <module_name>
required: true

dest_dir

The fully qualified path on the client system where the interpolated templates and files should be created
required: true

file_mode

The file mode for all of the files
required: false
defaut: 0600

dir_mode

The file mode for all of the directories that get created by the module required: false
defaut: 0700

owner

The owner of the file
required: false
default: 'nobody'

group

The owner of the file
required: false
default: 'nobody'

testing

rake spec in the root checkout of the module