Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicating proxy_cache_path value #1175

Closed
laughingguffly opened this issue Feb 2, 2018 · 2 comments
Closed

duplicating proxy_cache_path value #1175

laughingguffly opened this issue Feb 2, 2018 · 2 comments

Comments

@laughingguffly
Copy link

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?

@beezly
Copy link

beezly commented Feb 2, 2018

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 class - 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',
}

@laughingguffly
Copy link
Author

Great, thanks, that works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants