Merge pull request #11 from ezeep/master

Add Gentoo flavor
This commit is contained in:
Nitin Madhok 2014-12-03 03:44:41 -05:00
commit 44a2d049c9
3 changed files with 45 additions and 0 deletions

View File

@ -14,6 +14,8 @@ include:
- source: salt://memcached/templates/memcached.conf
{% elif grains['os_family'] == 'RedHat' %}
- source: salt://memcached/templates/sysconfig/memcached
{% elif grains['os_family'] == 'Gentoo' %}
- source: salt://memcached/templates/conf.d/memcached
{% endif %}
- watch_in:
- service: memcached

View File

@ -28,4 +28,11 @@
'config_file': '/etc/sysconfig/memcached',
'libmemcached': 'libmemcached-devel',
},
'Gentoo':{
'server': 'net-misc/memcached',
'service': 'memcached',
'python': 'dev-python/python-memcache',
'config_file': '/etc/conf.d/memcached',
'libmemcached': 'dev-libs/libmemcached',
},
}, merge=salt['pillar.get']('memcached:lookup')) %}

View File

@ -0,0 +1,36 @@
{% from 'memcached/macros.sls' import get_config_item with context -%}
# Copyright 2003 Gentoo Technologies, Inc
# $Header: /var/cvsroot/gentoo-x86/net-misc/memcached/files/1.3.3/conf,v 1.1 2009/05/26 00:03:09 robbat2 Exp $
# memcached config file
MEMCACHED_BINARY="/usr/bin/memcached"
#Specify memory usage in megabytes (do not use letters)
#64MB is default
MEMUSAGE="{{ get_config_item('memory_cap') }}"
#User to run as
MEMCACHED_RUNAS="memcached"
#Specify maximum number of concurrent connections
#1024 is default
MAXCONN="{{ get_config_item('max_connections') }}"
#Listen for connections on what address?
# If this is empty, memcached will listen on 0.0.0.0
# be sure you have a firewall in place!
LISTENON="{{ get_config_item('listen_address') }}"
#Listen for connections on what port?
PORT="{{ get_config_item('port') }}"
# Listen for UDP connecitons on what port? 0 means turn off UDP
UDPPORT="0"
#PID file location
# '-${PORT}.${CONF}.pid' will be appended to this!
# You do not normally need to change this.
PIDBASE="/var/run/memcached/memcached"
#Other Options
MISC_OPTS=""