Issue #6649 has been updated by Rob Tucker.

I created a module that should help with this issue.

It is available at the forge here: 
http://forge.puppetlabs.com/mozrtucker/recursive_directory

Any issues or feature requests are appreciated.

----------------------------------------
Feature #6649: template directory
https://projects.puppetlabs.com/issues/6649#change-97368

* Author: Klavs Klavsen
* Status: Rejected
* Priority: Normal
* Assignee: eric sorenson
* Category: templates
* Target version: 
* Affected Puppet version: 
* Keywords: ntbf
* Branch: 
----------------------------------------
Hi,

I find myself wanting a feature so that I could define an entire directory as a 
template'd folder.

ie. so that I simply define something like:
<pre>
file { "$destfolderpath":
        owner => root,
        group => root,
        mode => 644,
        content => templatedir("pam/pam.d-$lsbdistid.$lsbmajdistrelease"),
    }
</pre>
and the template function would simply work equivalently to what this would:
<pre>
file { "$destfolderpath":
        owner => root,
        group => root,
        mode => 644,
        source => "modules/pam/pam.d-$lsbdistid.$lsbmajdistrelease",
    }
</pre>
Except it would run all files in 
modules/pam/pam.d-$lsbdistid.$lsbmajdistrelease through the template function.

My current use case - would be to manage /etc/pam.d folder with it.
Each distro has different files in the folder - and depending on if I want 
f.ex. ldap, sftp etc. enabled - I would then simply handle this in the file 
using the normal template functions (and basing the decision on wether or not 
to enable f.ex. ldap - on a variable set in the module).

Currently I have to define each file that each distro has.. :(


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to