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