diff --git a/apps/assets/automations/base/manager.py b/apps/assets/automations/base/manager.py index 98e8690f0..656c6751b 100644 --- a/apps/assets/automations/base/manager.py +++ b/apps/assets/automations/base/manager.py @@ -314,7 +314,7 @@ class BasePlaybookManager: def delete_runtime_dir(self): if settings.DEBUG_DEV: return - shutil.rmtree(self.runtime_dir) + shutil.rmtree(self.runtime_dir, ignore_errors=True) def run(self, *args, **kwargs): print(">>> 任务准备阶段\n") diff --git a/apps/jumpserver/settings/base.py b/apps/jumpserver/settings/base.py index 0a21bd34f..a17c48bfc 100644 --- a/apps/jumpserver/settings/base.py +++ b/apps/jumpserver/settings/base.py @@ -39,7 +39,7 @@ PROJECT_DIR = const.PROJECT_DIR APPS_DIR = os.path.join(PROJECT_DIR, 'apps') DATA_DIR = os.path.join(PROJECT_DIR, 'data') SHARE_DIR = os.path.join(DATA_DIR, 'share') -ANSIBLE_DIR = os.path.join(DATA_DIR, 'ansible') +ANSIBLE_DIR = os.path.join(SHARE_DIR, 'ansible') CERTS_DIR = os.path.join(DATA_DIR, 'certs') # Quick-start development settings - unsuitable for production diff --git a/apps/terminal/automations/deploy_applet_host/__init__.py b/apps/terminal/automations/deploy_applet_host/__init__.py index 2ab3f13a0..623be3dea 100644 --- a/apps/terminal/automations/deploy_applet_host/__init__.py +++ b/apps/terminal/automations/deploy_applet_host/__init__.py @@ -145,7 +145,7 @@ class DeployAppletHostManager: def delete_runtime_dir(self): if settings.DEBUG_DEV: return - shutil.rmtree(self.run_dir) + shutil.rmtree(self.run_dir, ignore_errors=True) def _run(self, cb_func: callable, **kwargs): try: