From 8e1d91b3f183fc5eabfd83c14215ef845b7c1f14 Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Sun, 7 Sep 2014 13:23:06 +0800 Subject: [PATCH] Add 'createhome' option for 'user.present' state --- pillar.example | 1 + users/init.sls | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pillar.example b/pillar.example index 13e25e5..06ba2fa 100644 --- a/pillar.example +++ b/pillar.example @@ -8,6 +8,7 @@ users: fullname: B User password: $6$w............. home: /custom/buser + createhome: True sudouser: True sudo_rules: - ALL=(root) /usr/bin/find diff --git a/users/init.sls b/users/init.sls index 17abc6f..71ab150 100644 --- a/users/init.sls +++ b/users/init.sls @@ -55,6 +55,9 @@ {% if 'fullname' in user %} - fullname: {{ user['fullname'] }} {% endif -%} + {% if not user.get('createhome', True) %} + - createhome: False + {% endif %} - groups: - {{ user_group }} {% for group in user.get('groups', []) -%}