Bladeren bron

Merge pull request #144 from sacr0/master

added feature to create groups and set their gid
master
Niels Abspoel 6 jaren geleden
bovenliggende
commit
7f9f3df6c7
No account linked to committer's email address
1 gewijzigde bestanden met toevoegingen van 12 en 0 verwijderingen
  1. +12
    -0
      users/init.sls

+ 12
- 0
users/init.sls Bestand weergeven

@@ -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 -%}
@@ -94,7 +104,9 @@ users_{{ name }}_user:
{% endif %}
user.present:
- name: {{ name }}
{% if user.get('createhome', True) -%}
- home: {{ home }}
{% endif -%}
- shell: {{ user.get('shell', current.get('shell', users.get('shell', '/bin/bash'))) }}
{% if 'uid' in user -%}
- uid: {{ user['uid'] }}

Laden…
Annuleren
Opslaan