Procházet zdrojové kódy

Merge pull request #144 from sacr0/master

added feature to create groups and set their gid
tags/v0.45.0
Niels Abspoel před 6 roky
rodič
revize
7f9f3df6c7
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 12 přidání a 0 odebrání
  1. +12
    -0
      users/init.sls

+ 12
- 0
users/init.sls Zobrazit soubor

{% set used_googleauth = [] %} {% set used_googleauth = [] %}
{% set used_user_files = [] %} {% 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() {%- for name, user in pillar.get('users', {}).items()
if user.absent is not defined or not user.absent %} if user.absent is not defined or not user.absent %}
{%- if user == None -%} {%- if user == None -%}
{% endif %} {% endif %}
user.present: user.present:
- name: {{ name }} - name: {{ name }}
{% if user.get('createhome', True) -%}
- home: {{ home }} - home: {{ home }}
{% endif -%}
- shell: {{ user.get('shell', current.get('shell', users.get('shell', '/bin/bash'))) }} - shell: {{ user.get('shell', current.get('shell', users.get('shell', '/bin/bash'))) }}
{% if 'uid' in user -%} {% if 'uid' in user -%}
- uid: {{ user['uid'] }} - uid: {{ user['uid'] }}

Načítá se…
Zrušit
Uložit