diff --git a/apps/accounts/automations/gather_account/manager.py b/apps/accounts/automations/gather_account/manager.py index f4fec6b77..9cd6c1e4b 100644 --- a/apps/accounts/automations/gather_account/manager.py +++ b/apps/accounts/automations/gather_account/manager.py @@ -1,6 +1,6 @@ -import time from collections import defaultdict +import time from django.utils import timezone from accounts.const import AutomationTypes diff --git a/apps/assets/automations/base/manager.py b/apps/assets/automations/base/manager.py index ea5c91631..1837ddfea 100644 --- a/apps/assets/automations/base/manager.py +++ b/apps/assets/automations/base/manager.py @@ -3,10 +3,10 @@ import json import logging import os import shutil -import time from collections import defaultdict from socket import gethostname +import time import yaml from django.conf import settings from django.template.loader import render_to_string @@ -376,7 +376,7 @@ class PlaybookPrepareMixin: class BasePlaybookManager(PlaybookPrepareMixin, BaseManager): bulk_size = 100 ansible_account_policy = "privileged_first" - ansible_account_prefer = "root,Administrator" + ansible_account_prefer = "" def __init__(self, execution): super().__init__(execution) diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index 35c9e4748..6f6a7f485 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -1527,5 +1527,7 @@ "removeWarningMsg": "Are you sure you want to remove", "setVariable": "Set variable", "StopJob": "Stop job", - "ConnectMethodAclDetail": "Connect method acl detail" + "ConnectMethodAclDetail": "Connect method acl detail", + "DeleteAccount": "Delete account", + "DeleteBoth": "Delete both" } diff --git a/apps/i18n/lina/zh.json b/apps/i18n/lina/zh.json index 1b6432e8a..ba960dad3 100644 --- a/apps/i18n/lina/zh.json +++ b/apps/i18n/lina/zh.json @@ -1529,5 +1529,7 @@ "removeWarningMsg": "你确定要移除", "setVariable": "设置参数", "StopJob": "停止作业", - "ConnectMethodAclDetail": "连接方式详情" + "ConnectMethodAclDetail": "连接方式详情", + "DeleteAccount": "删除账号", + "DeleteBoth": "同时删除" } diff --git a/apps/libs/ansible/modules/oracle_user.py b/apps/libs/ansible/modules/oracle_user.py index 8a70b78e9..4579292b0 100644 --- a/apps/libs/ansible/modules/oracle_user.py +++ b/apps/libs/ansible/modules/oracle_user.py @@ -1,8 +1,8 @@ #!/usr/bin/python from __future__ import absolute_import, division, print_function -__metaclass__ = type +__metaclass__ = type DOCUMENTATION = ''' --- @@ -207,7 +207,7 @@ def main(): temporary_tablespace=temporary_tablespace ) elif state == 'absent': - user_remove(oracle_client) + user_remove(module, oracle_client, user) module.exit_json(changed=True, user=user)