mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Fix location of the createhome disablement
This commit is contained in:
parent
4143c6ad58
commit
d9d3785f26
@ -394,14 +394,8 @@ def present(name,
|
||||
|
||||
.. versionchanged:: 2015.8.0
|
||||
'''
|
||||
|
||||
# First check if a password is set. If password is set, check if
|
||||
# hash_password is True, then hash it.
|
||||
|
||||
if __grains__['kernel'] in ('Darwin', 'Windows'):
|
||||
# createhome not supported on Windows or Mac
|
||||
createhome = False
|
||||
|
||||
if password and hash_password:
|
||||
log.debug('Hashing a clear text password')
|
||||
password = __salt__['shadow.gen_password'](password)
|
||||
@ -415,6 +409,10 @@ def present(name,
|
||||
if homephone is not None:
|
||||
homephone = sdecode(homephone)
|
||||
|
||||
# createhome not supported on Windows or Mac
|
||||
if __grains__['kernel'] in ('Darwin', 'Windows'):
|
||||
createhome = False
|
||||
|
||||
ret = {'name': name,
|
||||
'changes': {},
|
||||
'result': True,
|
||||
|
Loading…
Reference in New Issue
Block a user