mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Update user states to reflect changes to login class handling
This commit is contained in:
parent
f24b979c7c
commit
e430e97f6c
@ -152,10 +152,9 @@ def _changes(name,
|
||||
change['homephone'] = homephone
|
||||
# OpenBSD login class
|
||||
if __grains__['kernel'] == 'OpenBSD':
|
||||
if not loginclass:
|
||||
loginclass = '""'
|
||||
if __salt__['user.get_loginclass'](name)['loginclass'] != loginclass:
|
||||
change['loginclass'] = loginclass
|
||||
if loginclass:
|
||||
if __salt__['user.get_loginclass'](name) != loginclass:
|
||||
change['loginclass'] = loginclass
|
||||
|
||||
return change
|
||||
|
||||
@ -443,8 +442,8 @@ def present(name,
|
||||
if lshad[key] != spost[key]:
|
||||
ret['changes'][key] = spost[key]
|
||||
if __grains__['kernel'] == 'OpenBSD':
|
||||
if lcpost['loginclass'] != lcpre['loginclass']:
|
||||
ret['changes']['loginclass'] = lcpost['loginclass']
|
||||
if lcpre != lcpost:
|
||||
ret['changes']['loginclass'] = lcpost
|
||||
if ret['changes']:
|
||||
ret['comment'] = 'Updated user {0}'.format(name)
|
||||
changes = _changes(name,
|
||||
|
Loading…
Reference in New Issue
Block a user