Giter VIP home page Giter VIP logo

puppet-recursive_directory's Introduction

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',
      owner      => 'root',
      group      => 'root',
      dir_mode   => '0700',
}

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

Parameters

source_dir
The module_name followed by a subfolder inside of /templates If source_dir is simply the modulename, recursive_directory will interpolate and create file resources for all files in required
dest_dir
The fully qualified path on the client system where the interpolated templates and files should be created *required*
file_mode
The file mode for all of the files. required. default: 0600
dir_mode
The file mode for all of the directories. required. default: 0700
owner
The owner of the file. default: 'nobody'
group
The group of the file. default: 'nobody'

Testing

rake spec in the root checkout of the module

$ bundle install
$ bundle exec rake spec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.