mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-27 15:54:14 +00:00
perf(systemuser): 优化系统用户家目录权限更改
This commit is contained in:
@@ -66,7 +66,10 @@ def get_push_unixlike_system_user_tasks(system_user, username=None):
|
|||||||
'module': 'group',
|
'module': 'group',
|
||||||
'args': 'name={} state=present'.format(username),
|
'args': 'name={} state=present'.format(username),
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
if not system_user.home:
|
||||||
|
tasks.extend([
|
||||||
{
|
{
|
||||||
'name': 'Check home dir exists',
|
'name': 'Check home dir exists',
|
||||||
'action': {
|
'action': {
|
||||||
@@ -83,7 +86,7 @@ def get_push_unixlike_system_user_tasks(system_user, username=None):
|
|||||||
},
|
},
|
||||||
'when': 'home_existed.stat.exists == true'
|
'when': 'home_existed.stat.exists == true'
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
if password:
|
if password:
|
||||||
tasks.append({
|
tasks.append({
|
||||||
'name': 'Set {} password'.format(username),
|
'name': 'Set {} password'.format(username),
|
||||||
|
Reference in New Issue
Block a user