From e35045801cfb49f86436686824711d5c04166753 Mon Sep 17 00:00:00 2001 From: Thomas Juberg Date: Mon, 22 Dec 2014 14:22:46 +0100 Subject: [PATCH] Add support for setting user expire --- pillar.example | 3 ++- users/init.sls | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 06ba2fa..8920020 100644 --- a/pillar.example +++ b/pillar.example @@ -9,8 +9,9 @@ users: password: $6$w............. home: /custom/buser createhome: True + expire: 16426 sudouser: True - sudo_rules: + sudo_rules: - ALL=(root) /usr/bin/find - ALL=(otheruser) /usr/bin/script.sh shell: /bin/bash diff --git a/users/init.sls b/users/init.sls index c599b9e..9fba180 100644 --- a/users/init.sls +++ b/users/init.sls @@ -58,6 +58,9 @@ {% if not user.get('createhome', True) %} - createhome: False {% endif %} + {% if 'expire' in user -%} + - expire: {{ user['expire'] }} + {% endif -%} - remove_groups: {{ user.get('remove_groups', 'False') }} - groups: - {{ user_group }}