浏览代码

added feature to create groups and set their gid

tags/v0.45.0
Arthur 7 年前
父节点
当前提交
694fd0de6d
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. +10
    -0
      users/init.sls

+ 10
- 0
users/init.sls 查看文件

@@ -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 -%}

正在加载...
取消
保存