Georg Pfuetzenreuter
7606cb5069
Support openSUSE / SUSE Linux Enterprise and add respective defaults. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
81 lines
2.4 KiB
Django/Jinja
81 lines
2.4 KiB
Django/Jinja
{%- if grains.os == 'MacOS' %}
|
|
{%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %}
|
|
{%- else %}
|
|
{%- set rootuser = 'root' %}
|
|
{%- endif %}
|
|
|
|
{% set defaults = {
|
|
'config':{
|
|
'daemonize': True,
|
|
'verbose_level': 0,
|
|
'log_file': '/var/log/memcached.log',
|
|
'memory_cap': 64,
|
|
'port': 11211,
|
|
'user': 'memcache',
|
|
'listen_address': '127.0.0.1',
|
|
'max_connections': 1024,
|
|
'lock_paged_memory': False,
|
|
'error_on_mem_full': False,
|
|
'max_core_file_limit': False,
|
|
'slab_size_limit': '1m'
|
|
}
|
|
} %}
|
|
{% set memcached = salt['grains.filter_by']({
|
|
'Default':{
|
|
'server': 'memcached',
|
|
'service': 'memcached',
|
|
'python': 'python-python-memcached',
|
|
'config_file': '/etc/memcached.conf',
|
|
'rootuser': rootuser,
|
|
},
|
|
'Suse':{
|
|
'server': 'memcached',
|
|
'service': 'memcached',
|
|
'python': 'python-python-memcached',
|
|
'config_file': '/etc/memcached.conf',
|
|
'libmemcached': 'libmemcached-devel',
|
|
'rootuser': rootuser,
|
|
'user': 'memcached',
|
|
'group': 'memcached',
|
|
},
|
|
'FreeBSD':{
|
|
'server': 'memcached',
|
|
'service': 'memcached',
|
|
'config_file': '/usr/local/etc/rc.d/memcached',
|
|
'libmemcached': 'libmemcached-devel',
|
|
'rootuser': rootuser,
|
|
},
|
|
'Debian':{
|
|
'server': 'memcached',
|
|
'service': 'memcached',
|
|
'python': 'python-memcache',
|
|
'config_file': '/etc/memcached.conf',
|
|
'libmemcached': 'libmemcached-dev',
|
|
'rootuser': rootuser,
|
|
},
|
|
'RedHat': {
|
|
'server': 'memcached',
|
|
'service': 'memcached',
|
|
'python': 'python-memcached',
|
|
'config_file': '/etc/sysconfig/memcached',
|
|
'libmemcached': 'libmemcached-devel',
|
|
'rootuser': rootuser,
|
|
},
|
|
'Gentoo':{
|
|
'server': 'net-misc/memcached',
|
|
'service': 'memcached',
|
|
'python': 'dev-python/python-memcache',
|
|
'config_file': '/etc/conf.d/memcached',
|
|
'libmemcached': 'dev-libs/libmemcached',
|
|
'rootuser': rootuser,
|
|
},
|
|
'Arch':{
|
|
'server': 'memcached',
|
|
'service': 'memcached',
|
|
'python': 'python2-memcached',
|
|
'config_file': '/etc/memcached',
|
|
'libmemcached': 'libmemcached',
|
|
'rootuser': rootuser,
|
|
},
|
|
}, merge=salt['pillar.get']('memcached:lookup')) %}
|