On Sunday, November 25, 2012 4:45:27 AM UTC-6, Craig Dunn wrote:
>
>  On 23/11/2012 23:03, fpommier wrote:
>  
> Hi, 
> I use puppet 2.7.16
> i try to use hiera to store file data
> yaml file :
>  apt:
>   '/etc/apt/preferences.d':
>      ensure: directory
>      recurse: true
>      source: "puppet:///$environment/$module_name/preferences.d"
>  
>  
> Try this with;
>
>        source: "puppet:///%{environment}/%{module_name}/preferenced.d
>
> Your source path confuses me a bit anyway, surely your environment 
> dictates your modulepath and this should just be 
> puppet:///modules/%{module_name}/preferences.d ?
>
>
And, therefore, it's probably not useful to interpolate even the 
%{module_name}.  The datum is probably used only by one module, almost 
certainly having the same name in every environment, and that module knows 
its own name.  In fact, the whole thing probably ought to be written into 
the relevant class instead of being loaded indirectly via hiera.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JbC629B-_qcJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to