Skip to content

Commit

Permalink
Fixed #57
Browse files Browse the repository at this point in the history
  • Loading branch information
grant-veepshosting committed Jun 4, 2024
1 parent 7da8440 commit 5d9ba79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit 5d9ba79

Please sign in to comment.