added feature to create groups and set their gid

This commit is contained in:
Arthur 2017-04-18 19:57:18 +02:00
parent 8c6bbafd9b
commit 694fd0de6d

View File

@ -4,6 +4,16 @@
{% set used_googleauth = [] %}
{% set used_user_files = [] %}
{% for group, setting in salt['pillar.get']('groups', {}).iteritems() %}
users_group_{{ setting.get('state', "present") }}_{{ group }}:
group.{{ setting.get('state', "present") }}:
- name: {{ group }}
{%- if setting.get('gid') %}
- gid: {{setting.get('gid') }}
{%- endif %}
- system: {{ setting.get('system',"False") }}
{% endfor %}
{%- for name, user in pillar.get('users', {}).items()
if user.absent is not defined or not user.absent %}
{%- if user == None -%}