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

Fixed https://github.com/voxpupuli/puppet-varnish/issues/57 #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# passed to varnish conf-file
# @param storage_type
# which storage will be used for varnish - default malloc
# @param transient_malloc
# Configure transient memory allocation if requried (optional)
# Example hiera config varnish::transient_malloc: '512m'
# @param varnish_vcl_conf
# path to main vcl file
# @param varnish_user
Expand Down Expand Up @@ -82,7 +85,7 @@
# Add varnish::hitch class to install hitch
# @param add_ncsa
# Add varnish::ncsa class to install varnishncsa Service
#
#
# @example Installs Varnish
# # enables Varnish service
# # uses default VCL '/etc/varnish/default.vcl'
Expand All @@ -105,6 +108,7 @@
String $nfiles = '131072',
String $memlock = '100M',
String $storage_type = 'malloc',
String $transient_malloc = 'undef',
Stdlib::Absolutepath $varnish_vcl_conf = '/etc/varnish/default.vcl',
String $varnish_user = 'varnish',
Optional[String] $varnish_jail_user = undef,
Expand Down
3 changes: 3 additions & 0 deletions templates/varnish-conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ DAEMON_OPTS="-a <%= scope.lookupvar('varnish_listen_address') %>:<%= scope.looku
<% else -%>
-s <%= scope.lookupvar('storage_type') %>,<%= scope.lookupvar('varnish_storage_file') %>,<%= scope.lookupvar('varnish_storage_size') %> \
<% end -%>
<% if scope.lookupvar('storage_type') == 'malloc' && scope.lookupvar('transient_malloc') != 'undef' -%>
-s Transient=<%= scope.lookupvar('storage_type') %>,<%= scope.lookupvar('transient_malloc') %>
<% end -%>
<% if @vcl_dir -%>
-p vcl_dir=<%= @vcl_dir %> \
<% end -%>
Expand Down
Loading