memcached-formula/memcached/init.sls

29 lines
813 B
Plaintext
Raw Permalink Normal View History

{% from 'memcached/map.jinja' import memcached with context %}
2013-06-14 00:16:03 +02:00
memcached:
2020-03-28 02:18:01 +01:00
{%- 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 %}
2014-12-13 08:19:59 +01:00
pkg.installed:
- name: {{ memcached.server }}
2020-08-01 14:52:38 +02:00
- runas: {{ memcached.rootuser }}
2020-03-28 02:18:01 +01:00
{%- endif %}
- require_in:
- service: memcached
2014-12-13 08:19:59 +01:00
service.running:
2013-06-14 00:16:03 +02:00
- enable: True
- name: {{ memcached.service }}