mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge branch '2018.3' into 50966_nxos_ensure_kwargs_list
This commit is contained in:
commit
230a66b901
@ -349,8 +349,8 @@ def set_date(name, date):
|
||||
|
||||
salt '*' shadow.set_date username 0
|
||||
'''
|
||||
cmd = 'chage -d {0} {1}'.format(date, name)
|
||||
return not __salt__['cmd.run'](cmd, python_shell=False)
|
||||
cmd = ['chage', '-d', date, name]
|
||||
return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
|
||||
|
||||
|
||||
def set_expire(name, expire):
|
||||
@ -367,8 +367,8 @@ def set_expire(name, expire):
|
||||
|
||||
salt '*' shadow.set_expire username -1
|
||||
'''
|
||||
cmd = 'chage -E {0} {1}'.format(expire, name)
|
||||
return not __salt__['cmd.run'](cmd, python_shell=False)
|
||||
cmd = ['chage', '-E', expire, name]
|
||||
return __salt__['cmd.retcode'](cmd, python_shell=False) == 0
|
||||
|
||||
|
||||
def list_users():
|
||||
|
Loading…
Reference in New Issue
Block a user