From 634deacc73081f282736707af22fb53cfee30cbe Mon Sep 17 00:00:00 2001 From: Jessy Date: Thu, 17 Jan 2019 13:36:01 +0100 Subject: [PATCH] incorporated change suggestions --- users/defaults.yaml | 1 + users/init.sls | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/users/defaults.yaml b/users/defaults.yaml index 09a0dd9..2b69c19 100644 --- a/users/defaults.yaml +++ b/users/defaults.yaml @@ -6,4 +6,5 @@ users-formula: users: allow_gid_change: True + createhome: True diff --git a/users/init.sls b/users/init.sls index ee06d21..696ccbd 100644 --- a/users/init.sls +++ b/users/init.sls @@ -53,7 +53,7 @@ include: {%- endif -%} {%- set current = salt.user.info(name) -%} {%- set home = user.get('home', current.get('home', "/home/%s" % name)) -%} -{%- set createhome = user.get('createhome', True) -%} +{%- set createhome = user.get('createhome') -%} {%- if 'prime_group' in user and 'name' in user['prime_group'] %} {%- set user_group = user.prime_group.name -%} @@ -144,9 +144,7 @@ users_{{ name }}_user: {% if 'homephone' in user %} - homephone: {{ user['homephone'] }} {% endif %} - {% if not createhome -%} - - createhome: False - {% endif %} + - createhome: {{ createhome }} {% if not user.get('unique', True) %} - unique: False {% endif %}