memcached-formula/memcached/map.jinja

79 lines
2.4 KiB
Plaintext
Raw Normal View History

2020-08-01 14:52:38 +02:00
{%- if grains.os == 'MacOS' %}
{%- set rootuser = salt['cmd.run']("stat -f '%Su' /dev/console") %}
{%- else %}
{%- set rootuser == 'root' %}
{%- endif %}
{% set defaults = {
'config':{
2017-06-22 10:44:14 +02:00
'daemonize': True,
'verbose_level': 0,
2014-03-01 15:28:32 +01:00
'log_file': '/var/log/memcached.log',
'memory_cap': 64,
'port': 11211,
2014-01-21 01:05:31 +01:00
'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',
2017-06-22 10:44:14 +02:00
}
} %}
{% set memcached = salt['grains.filter_by']({
2020-08-01 14:52:38 +02:00
'Default':{
'server': 'memcached',
'service': 'memcached',
'python': 'python-python-memcached',
'config_file': '/etc/memcached.conf',
'rootuser': {{ rootuser }},
},
2019-02-18 13:19:26 +01:00
'Suse':{
'server': 'memcached',
'service': 'memcached',
'python': 'python-python-memcached',
'config_file': '/etc/memcached.conf',
'libmemcached': 'libmemcached-devel',
2020-08-01 14:52:38 +02:00
'rootuser': {{ rootuser }},
2019-02-18 13:19:26 +01:00
},
2020-03-28 02:18:01 +01:00
'FreeBSD':{
'server': 'memcached',
'service': 'memcached',
'config_file': '/usr/local/etc/rc.d/memcached',
'libmemcached': 'libmemcached-devel',
2020-08-01 14:52:38 +02:00
'rootuser': {{ rootuser }},
2020-03-28 02:18:01 +01:00
},
'Debian':{
'server': 'memcached',
'service': 'memcached',
'python': 'python-memcache',
2014-11-17 20:10:20 +01:00
'config_file': '/etc/memcached.conf',
2014-12-02 17:28:48 +01:00
'libmemcached': 'libmemcached-dev',
2020-08-01 14:52:38 +02:00
'rootuser': {{ rootuser }},
},
'RedHat': {
'server': 'memcached',
'service': 'memcached',
'python': 'python-memcached',
2014-11-17 20:10:20 +01:00
'config_file': '/etc/sysconfig/memcached',
2014-12-02 17:28:48 +01:00
'libmemcached': 'libmemcached-devel',
2020-08-01 14:52:38 +02:00
'rootuser': {{ rootuser }},
},
2014-12-03 09:31:50 +01:00
'Gentoo':{
'server': 'net-misc/memcached',
'service': 'memcached',
'python': 'dev-python/python-memcache',
'config_file': '/etc/conf.d/memcached',
'libmemcached': 'dev-libs/libmemcached',
2020-08-01 14:52:38 +02:00
'rootuser': {{ rootuser }},
2014-12-03 09:31:50 +01:00
},
2015-09-10 21:19:08 +02:00
'Arch':{
'server': 'memcached',
'service': 'memcached',
'python': 'python2-memcached',
'config_file': '/etc/memcached',
'libmemcached': 'libmemcached',
2020-08-01 14:52:38 +02:00
'rootuser': {{ rootuser }},
2015-09-10 21:19:08 +02:00
},
}, merge=salt['pillar.get']('memcached:lookup')) %}