perf: 交换机切换至卡住 (#12096)

Co-authored-by: feng <1304903146@qq.com>
pull/12098/head
fit2bot 2023-11-14 10:58:57 +08:00 committed by GitHub
parent 521c1f0dfa
commit 5f121934a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class Account(AbsConnectivity, BaseAccount):
return auth
auth.update(self.make_account_ansible_vars(su_from))
become_method = 'sudo' if platform.su_method != 'su' else 'su'
become_method = platform.su_method if platform.su_method else 'sudo'
password = su_from.secret if become_method == 'sudo' else self.secret
auth['ansible_become'] = True
auth['ansible_become_method'] = become_method