mirror of https://github.com/jumpserver/jumpserver
perf: 优化系统用户和资产,只有协议包含时才进行关联和推送
parent
7eed182627
commit
8a77a7b8b5
|
@ -51,7 +51,7 @@ def clean_ansible_task_hosts(assets, system_user=None):
|
|||
if not check_asset_can_run_ansible(asset):
|
||||
continue
|
||||
# 资产平台不包含系统用户的协议, 不推送
|
||||
if system_user.protocol not in asset.protocols_as_dict:
|
||||
if system_user and system_user.protocol not in asset.protocols_as_dict:
|
||||
logger.info(_('Asset protocol not support system user protocol, skipped: {}').format(system_user.protocol))
|
||||
continue
|
||||
cleaned_assets.append(asset)
|
||||
|
|
Loading…
Reference in New Issue