diff --git a/manifests/params.pp b/manifests/params.pp index 92c734ff8..20cb1ca51 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,7 +11,7 @@ $config_tmpl = "${module_name}/memcached.conf.erb" $user = 'nobody' } - 'RedHat': { + /RedHat|Suse/: { $package_name = 'memcached' $service_name = 'memcached' $service_hasstatus = true diff --git a/templates/memcached_sysconfig.erb b/templates/memcached_sysconfig.erb index 307790442..f9f38f90a 100644 --- a/templates/memcached_sysconfig.erb +++ b/templates/memcached_sysconfig.erb @@ -1,9 +1,4 @@ -PORT="<%= @tcp_port %>" -USER="<%= @user %>" -MAXCONN="<%= @max_connections %>" -<% Puppet::Parser::Functions.function('memcached_max_memory') -%> -CACHESIZE="<%= scope.function_memcached_max_memory([@max_memory]) %>" -OPTIONS="<% +<%- result = [] if @verbosity result << '-' + @verbosity.to_s @@ -24,4 +19,34 @@ result << '-t ' + @processorcount if @logfile result << '>> ' + @logfile + ' 2>&1' end --%><%= result.join(' ') -%>" +-%> +<%- if scope['osfamily'] != 'Suse' -%> +PORT="<%= @tcp_port %>" +USER="<%= @user %>" +MAXCONN="<%= @max_connections %>" +<% Puppet::Parser::Functions.function('memcached_max_memory') -%> +CACHESIZE="<%= scope.function_memcached_max_memory([@max_memory]) %>" +OPTIONS="<%= result.join(' ') %>" +<%- else -%> +MEMCACHED_PARAMS="<%= result.join(' ') %>" + +## Path: Network/WWW/Memcached +## Description: username memcached should run as +## Type: string +## Default: "memcached" +## Config: memcached +# +# username memcached should run as +# +MEMCACHED_USER="<%= @user %>" + +## Path: Network/WWW/Memcached +## Description: group memcached should be run as +## Type: string +## Default: "memcached" +## Config: memcached +# +# group memcached should be run as +# +MEMCACHED_GROUP="<%= @user %>" +<%- end -%>