Skip to content

Commit

Permalink
sles support
Browse files Browse the repository at this point in the history
  • Loading branch information
globin committed Jun 22, 2014
1 parent 468742f commit 64bb421
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 32 additions & 7 deletions templates/memcached_sysconfig.erb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 -%>

0 comments on commit 64bb421

Please sign in to comment.