fix: Failed to delete account

pull/15086/head
wangruidong 2025-03-20 16:56:59 +08:00 committed by w940853815
parent afc31ee5ce
commit db259d4e8b
5 changed files with 11 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import time
from collections import defaultdict from collections import defaultdict
import time
from django.utils import timezone from django.utils import timezone
from accounts.const import AutomationTypes from accounts.const import AutomationTypes

View File

@ -3,10 +3,10 @@ import json
import logging import logging
import os import os
import shutil import shutil
import time
from collections import defaultdict from collections import defaultdict
from socket import gethostname from socket import gethostname
import time
import yaml import yaml
from django.conf import settings from django.conf import settings
from django.template.loader import render_to_string from django.template.loader import render_to_string
@ -376,7 +376,7 @@ class PlaybookPrepareMixin:
class BasePlaybookManager(PlaybookPrepareMixin, BaseManager): class BasePlaybookManager(PlaybookPrepareMixin, BaseManager):
bulk_size = 100 bulk_size = 100
ansible_account_policy = "privileged_first" ansible_account_policy = "privileged_first"
ansible_account_prefer = "root,Administrator" ansible_account_prefer = ""
def __init__(self, execution): def __init__(self, execution):
super().__init__(execution) super().__init__(execution)

View File

@ -1527,5 +1527,7 @@
"removeWarningMsg": "Are you sure you want to remove", "removeWarningMsg": "Are you sure you want to remove",
"setVariable": "Set variable", "setVariable": "Set variable",
"StopJob": "Stop job", "StopJob": "Stop job",
"ConnectMethodAclDetail": "Connect method acl detail" "ConnectMethodAclDetail": "Connect method acl detail",
"DeleteAccount": "Delete account",
"DeleteBoth": "Delete both"
} }

View File

@ -1529,5 +1529,7 @@
"removeWarningMsg": "你确定要移除", "removeWarningMsg": "你确定要移除",
"setVariable": "设置参数", "setVariable": "设置参数",
"StopJob": "停止作业", "StopJob": "停止作业",
"ConnectMethodAclDetail": "连接方式详情" "ConnectMethodAclDetail": "连接方式详情",
"DeleteAccount": "删除账号",
"DeleteBoth": "同时删除"
} }

View File

@ -1,8 +1,8 @@
#!/usr/bin/python #!/usr/bin/python
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type
__metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
@ -207,7 +207,7 @@ def main():
temporary_tablespace=temporary_tablespace temporary_tablespace=temporary_tablespace
) )
elif state == 'absent': elif state == 'absent':
user_remove(oracle_client) user_remove(module, oracle_client, user)
module.exit_json(changed=True, user=user) module.exit_json(changed=True, user=user)