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

proxy_cache_path should allow different values for its settings when an hash is used. #1571

Open
pier4r opened this issue Aug 16, 2023 · 0 comments

Comments

@pier4r
Copy link

pier4r commented Aug 16, 2023

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.x
  • Distribution: all
  • Module version: master branch as of 2023-08-16

What are you seeing

In templates/conf.d/nginx.conf.erb one can define multiple cache paths, as show as the following code.

<% if @proxy_cache_path.is_a?(Hash) -%>
<% @proxy_cache_path.sort_by{|k,v| k}.each do |key,value| -%>
  proxy_cache_path        <%= key %> levels=<%= @proxy_cache_levels %> keys_zone=<%= value %> 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 -%>;
<% end -%>

Anyway one can see that several parameters are the same even if multiple paths are defined. For example max_size or inactive.

What behaviour did you expect instead

I would like to set for each cache path their own values, not using part of the values that are the same for every cache path. Namely.

<% if @proxy_cache_path.is_a?(Hash) -%>
<% @proxy_cache_path.sort_by{|k,v| k}.each do |key,value| -%>
  proxy_cache_path        <%= key %> levels=<%= value['levels'] %> keys_zone=<%= value['keys_zone'] %> max_size=<%= value['max_size'] %> inactive=<%= value['inactive'] -%>
...

Any additional information you'd like to impart

Anyway the work done in the module is pretty awesome, thank you for keeping up

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

1 participant