feat(suse): add SUSE support
Support openSUSE / SUSE Linux Enterprise and add respective defaults. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
ba7fdda416
commit
7606cb5069
4
FORMULA
4
FORMULA
@ -1,6 +1,6 @@
|
||||
name: memcached
|
||||
os: RedHat, Debian, Arch, Gentoo
|
||||
os_family: RedHat, Debian, Arch, Gentoo
|
||||
os: RedHat, Debian, Arch, Gentoo, SUSE
|
||||
os_family: RedHat, Debian, Arch, Gentoo, Suse
|
||||
version: 201601
|
||||
release: 1
|
||||
minimum_version: 2015.8
|
||||
|
@ -17,6 +17,7 @@ memcached_user:
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
{%- if grains['os_family'] != 'Suse' %}
|
||||
{% if grains['os_family'] == 'Debian' %}
|
||||
- source: salt://memcached/templates/memcached.conf
|
||||
{% elif grains['os_family'] == 'RedHat' %}
|
||||
@ -26,8 +27,21 @@ memcached_user:
|
||||
{% elif grains['os_family'] == 'Arch' %}
|
||||
- source: salt://memcached/templates/empty
|
||||
{% endif %}
|
||||
{%- endif %}
|
||||
- watch_in:
|
||||
- service: memcached
|
||||
- require:
|
||||
- user: memcached_user
|
||||
|
||||
{%- if grains['os_family'] == 'Suse' %}
|
||||
memcached_settings_suse:
|
||||
file.keyvalue:
|
||||
- name: {{ memcached.config_file }}
|
||||
- separator: '='
|
||||
- key_values:
|
||||
MEMCACHED_USER: '{{ get_config_item('user') }}'
|
||||
MEMCACHED_GROUP: '{{ get_config_item('group') }}'
|
||||
MEMCACHED_PARAMS: '-l {{ get_config_item('listen_address') }}'
|
||||
- watch_in:
|
||||
- service: memcached
|
||||
{%- endif %}
|
||||
|
@ -35,6 +35,8 @@
|
||||
'config_file': '/etc/memcached.conf',
|
||||
'libmemcached': 'libmemcached-devel',
|
||||
'rootuser': rootuser,
|
||||
'user': 'memcached',
|
||||
'group': 'memcached',
|
||||
},
|
||||
'FreeBSD':{
|
||||
'server': 'memcached',
|
||||
|
Loading…
Reference in New Issue
Block a user