瀏覽代碼

Adds 'empty_password' statement for states.user.present

lookup-fix-3
outime 9 年之前
父節點
當前提交
851a59e952
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. +3
    -0
      pillar.example
  2. +4
    -1
      users/init.sls

+ 3
- 0
pillar.example 查看文件

@@ -8,6 +8,9 @@ users:
fullname: B User
password: $6$w.............
enforce_password: True
# WARNING: If 'empty_password' is set to True, the 'password' statement
# will be ignored by enabling password-less login for the user.
empty_password: False
home: /custom/buser
createhome: True
roomnumber: "A-1"

+ 4
- 1
users/init.sls 查看文件

@@ -78,9 +78,12 @@ users_{{ name }}_user:
{% if 'uid' in user -%}
- uid: {{ user['uid'] }}
{% endif -%}
{% if 'password' in user -%}
{% if 'password in user -%}
- password: '{{ user['password'] }}'
{% endif -%}
{% if empty_password is defined -%}
- empty_password: {{ user['empty_password'] }}
{% endif -%}
{% if 'enforce_password' in user -%}
- enforce_password: {{ user['enforce_password'] }}
{% endif -%}

Loading…
取消
儲存