Issue #6649 has been updated by Devon Peters.

Category set to templates

Looks like this still needs to be raised in puppet-users.
----------------------------------------
Feature #6649: template directory
https://projects.puppetlabs.com/issues/6649

Author: Klavs Klavsen
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category: templates
Target version: 
Affected Puppet version: 
Keywords: 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to