fix: 改密切换至检测可连接性 失败 (#11951)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2023-10-24 15:18:27 +08:00
committed by GitHub
parent f51d375f48
commit dcb9270d02
2 changed files with 4 additions and 2 deletions

View File

@@ -136,7 +136,8 @@ class ChangeSecretManager(AccountBasePlaybookManager):
'username': account.username,
'secret_type': secret_type,
'secret': new_secret,
'private_key_path': private_key_path
'private_key_path': private_key_path,
'become': account.get_ansible_become_auth(),
}
if asset.platform.type == 'oracle':
h['account']['mode'] = 'sysdba' if account.privileged else None

View File

@@ -56,7 +56,8 @@ class PushAccountManager(ChangeSecretManager, AccountBasePlaybookManager):
'username': account.username,
'secret_type': secret_type,
'secret': new_secret,
'private_key_path': private_key_path
'private_key_path': private_key_path,
'become': account.get_ansible_become_auth(),
}
if asset.platform.type == 'oracle':
h['account']['mode'] = 'sysdba' if account.privileged else None