From 5538eb18ab75b8e348c24c6cbc4d3b5757db0147 Mon Sep 17 00:00:00 2001 From: jraby Date: Fri, 5 Aug 2016 14:05:12 -0400 Subject: [PATCH] Support for optional_groups --- users/init.sls | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/users/init.sls b/users/init.sls index 8e917ea..69e513d 100644 --- a/users/init.sls +++ b/users/init.sls @@ -135,6 +135,12 @@ users_{{ name }}_user: {% for group in user.get('groups', []) -%} - {{ group }} {% endfor %} + {% if 'optional_groups' in user %} + - optional_groups: + {% for optional_group in user['optional_groups'] -%} + - {{optional_group}} + {% endfor %} + {% endif %} - require: - group: {{ user_group }} {% for group in user.get('groups', []) -%}