Merge pull request #98 from outime/master

Adds 'empty_password' statement for states.user.present (issue #97)
This commit is contained in:
puneet kandhari 2015-09-27 12:00:07 -05:00
commit bcd6b44c70
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,9 @@ users:
fullname: B User fullname: B User
password: $6$w............. password: $6$w.............
enforce_password: True 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 home: /custom/buser
createhome: True createhome: True
roomnumber: "A-1" roomnumber: "A-1"

View File

@ -81,6 +81,9 @@ users_{{ name }}_user:
{% if 'password' in user -%} {% if 'password' in user -%}
- password: '{{ user['password'] }}' - password: '{{ user['password'] }}'
{% endif -%} {% endif -%}
{% if user.get('empty_password') -%}
- empty_password: {{ user.get('empty_password') }}
{% endif -%}
{% if 'enforce_password' in user -%} {% if 'enforce_password' in user -%}
- enforce_password: {{ user['enforce_password'] }} - enforce_password: {{ user['enforce_password'] }}
{% endif -%} {% endif -%}