feat(freebsd): add freebsd support
This commit is contained in:
parent
f441a28568
commit
6525a253dc
@ -1,7 +1,7 @@
|
|||||||
memcached
|
memcached
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Install and start the memcached service
|
Install and start the memcached service on GNU/Linux and FreeBSD
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@ -1,10 +1,27 @@
|
|||||||
{% from 'memcached/map.jinja' import memcached with context %}
|
{% from 'memcached/map.jinja' import memcached with context %}
|
||||||
|
|
||||||
memcached:
|
memcached:
|
||||||
|
{%- if grains.os_family in ('FreeBSD',) %}
|
||||||
|
cmd.run:
|
||||||
|
- names:
|
||||||
|
- portsnap fetch
|
||||||
|
- portsnap extract
|
||||||
|
- cd /usr/ports/distfiles
|
||||||
|
- curl -LO https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.27/cyrus-sasl-2.1.27.tar.gz
|
||||||
|
- cd /usr/ports/databases/memcached && make deinstall && make install clean
|
||||||
|
- env:
|
||||||
|
- BATCH: 'yes'
|
||||||
|
sysrc.managed:
|
||||||
|
- name: memcached_enable
|
||||||
|
- value: YES
|
||||||
|
- require:
|
||||||
|
- cmd: memcached
|
||||||
|
{%- else %}
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ memcached.server }}
|
- name: {{ memcached.server }}
|
||||||
|
{%- endif %}
|
||||||
|
- require_in:
|
||||||
|
- service: memcached
|
||||||
service.running:
|
service.running:
|
||||||
- enable: True
|
- enable: True
|
||||||
- name: {{ memcached.service }}
|
- name: {{ memcached.service }}
|
||||||
- require:
|
|
||||||
- pkg: memcached
|
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
'config_file': '/etc/memcached.conf',
|
'config_file': '/etc/memcached.conf',
|
||||||
'libmemcached': 'libmemcached-devel',
|
'libmemcached': 'libmemcached-devel',
|
||||||
},
|
},
|
||||||
|
'FreeBSD':{
|
||||||
|
'server': 'memcached',
|
||||||
|
'service': 'memcached',
|
||||||
|
'config_file': '/usr/local/etc/rc.d/memcached',
|
||||||
|
'libmemcached': 'libmemcached-devel',
|
||||||
|
},
|
||||||
'Debian':{
|
'Debian':{
|
||||||
'server': 'memcached',
|
'server': 'memcached',
|
||||||
'service': 'memcached',
|
'service': 'memcached',
|
||||||
|
Loading…
Reference in New Issue
Block a user