From dcb9270d0227dc813e5a00e40fe6424dee332154 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:18:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E5=AF=86=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=87=B3=E6=A3=80=E6=B5=8B=E5=8F=AF=E8=BF=9E=E6=8E=A5=E6=80=A7?= =?UTF-8?q?=20=E5=A4=B1=E8=B4=A5=20(#11951)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng <1304903146@qq.com> --- apps/accounts/automations/change_secret/manager.py | 3 ++- apps/accounts/automations/push_account/manager.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/accounts/automations/change_secret/manager.py b/apps/accounts/automations/change_secret/manager.py index 9d1c2f441..18ee771ed 100644 --- a/apps/accounts/automations/change_secret/manager.py +++ b/apps/accounts/automations/change_secret/manager.py @@ -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 diff --git a/apps/accounts/automations/push_account/manager.py b/apps/accounts/automations/push_account/manager.py index 791a281ca..7f9afc796 100644 --- a/apps/accounts/automations/push_account/manager.py +++ b/apps/accounts/automations/push_account/manager.py @@ -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