From 6f8f59ad489fec828ee7cd26f68badaed9f22b98 Mon Sep 17 00:00:00 2001 From: NoNE Date: Sat, 24 Mar 2018 00:11:30 +0200 Subject: [PATCH] assure that the specified user is present --- memcached/config.sls | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/memcached/config.sls b/memcached/config.sls index 62d3eb1..f51c490 100644 --- a/memcached/config.sls +++ b/memcached/config.sls @@ -1,7 +1,14 @@ {% from 'memcached/map.jinja' import memcached with context %} +{% from 'memcached/macros.sls' import get_config_item with context -%} include: - memcached + +memcached_user: + user.present: + - name : {{ get_config_item('user') }} + - createhome: False + - shell: /sbin/nologin {{ memcached.config_file }}: file: @@ -21,3 +28,6 @@ include: {% endif %} - watch_in: - service: memcached + - require: + - user: memcached_user +