opened
laughingguffly
username_0
I'm currently intialising like this:

`class{'nginx':
manage_repo => true,
package_source => 'nginx-mainline',
 proxy_cache_path => '/var/nginx/cache levels=1 keys_zone=ctsCache:8m max_size=100m inactive=1h',
 }`

However puppet is generating a proxy_cache_path as
`  proxy_cache_path        /var/nginx/cache levels=1 keys_zone=ctsCache:8m max_size=100m inactive=1h levels=1 keys_zone=d2:100m max_size=500m inactive=20m;`

It is using my value and the template value from puppet-nginx. How do I stop this happening? Is this a bug?
duplicating proxy_cache_path value
issue
created
beezly
username_1
From the template code:

```<% elsif @proxy_cache_path -%>
  proxy_cache_path        <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive -%>
  <%- if @proxy_use_temp_path %> use_temp_path=<%= @proxy_use_temp_path %><% end -%>
  <%- if @proxy_cache_loader_files %> loader_files=<%= @proxy_cache_loader_files %><% end -%>
  <%- if @proxy_cache_loader_sleep %> loader_sleep=<%= @proxy_cache_loader_sleep %><% end -%>
  <%- if @proxy_cache_loader_threshold %> loader_threshold=<%= @proxy_cache_loader_threshold %><% end -%>;```

It looks like proxy_cache_path is just expecting the path value (ie. `/var/nginx/cache` in your case) and then the other settings you have specified should be specified as separate parameters to the resource - `proxy_cache_levels`, `proxy_cache_keys_zone`, `proxy_cache_max_size`, `proxy_cache_inactive`.

Try using:

```
class{'nginx': 
  manage_repo => true,
  package_source => 'nginx-mainline',
  proxy_cache_path => '/var/nginx/cache',
  proxy_cache_levels='1',
  proxy_cache_keys_zone='ctsCache:8m'
  proxy_cache_max_size='100m' 
  proxy_cache_inactive='1h',
}
```
comment