On Wednesday, September 28, 2016 at 4:35:50 PM UTC-4, Garrett Honeycutt wrote: > > On 9/28/16 3:54 PM, Ugo Bellavance wrote: > > Hi, > > > > I am working with this module https://github.com/voxpupuli/puppet-nginx > > to get some nginx servers up. Here is my hiera config for a vhost: > > > > nginx::nginx_vhosts: > > 'website1.domain.com': > > proxy: 'http://website1.internal' > > > > I would like to have my logs in one directory per vhost. > > > > Here is what I have for now: > > > > nginx::http_access_log: "%{hiera('nginx::config::log_dir')}/access_log" > > > > > > In the template, it looks like that: > > > > "${::nginx::config::log_dir}/${name_sanitized}.access.log > ${format_log}", > > > > Would there be a way to set it in hiera so that it is the equivalent of > > this: > > > > "${::nginx::config::log_dir}/${name_sanitized}/access.log > ${format_log}", > > > > Of course, I would like to avoid having to edit the template. > > > > Thanks, > > > > Hi Ugo, > > nginx_vhosts has a parameter named access_log. You could use that as > follows. > > nginx::nginx_vhosts: > 'website1.domain.com': > proxy: 'http://website1.internal' > access_log: '/whatever/access.log' > > > https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/resource/vhost.pp#L145 > > > > Makes sense, I didn't see that one. In fact I was looking for a way to make it automatic instead of always have to enter the log path.
Thanks, -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5361a1a9-67ad-4cb6-b0d7-a6f695bf3980%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
