From 60e94564d135a8b1fcc6ae8b3a5f5024f2864892 Mon Sep 17 00:00:00 2001 From: Simon Lloyd Date: Thu, 13 Aug 2015 23:57:09 +0200 Subject: [PATCH] Don't add sudo group by default. This formula doesn't really require the sudo group (unless there are actually users in that group). Moreover, on FreeBSD the 'admin' group would be wheel and not sudo. --- users/init.sls | 6 ++++-- users/sudo.sls | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/users/init.sls b/users/init.sls index 13317c8..1ec10a9 100644 --- a/users/init.sls +++ b/users/init.sls @@ -39,9 +39,11 @@ include: {% for group in user.get('groups', []) %} users_{{ name }}_{{ group }}_group: - group: + group.present: - name: {{ group }} - - present + {% if group == 'sudo' %} + - system: True + {% endif %} {% endfor %} users_{{ name }}_user: diff --git a/users/sudo.sls b/users/sudo.sls index 2953ad2..092d004 100644 --- a/users/sudo.sls +++ b/users/sudo.sls @@ -6,16 +6,10 @@ users_bash-package: pkg.installed: - name: {{ users.bash_package }} -users_sudo-group: - group.present: - - name: sudo - - system: True - users_sudo-package: pkg.installed: - name: {{ users.sudo_package }} - require: - - group: users_sudo-group - file: {{ users.sudoers_dir }} users_{{ users.sudoers_dir }}: