From ca5f6f3c6f9253787fc4894ab0a51cbb5ed1ff03 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 20 Jul 2022 13:01:43 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=20windows=20ansible?= =?UTF-8?q?=20shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ops/inventory.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/ops/inventory.py b/apps/ops/inventory.py index b19ce8130..9ad69b9ac 100644 --- a/apps/ops/inventory.py +++ b/apps/ops/inventory.py @@ -15,8 +15,6 @@ logger = get_logger(__file__) class JMSBaseInventory(BaseInventory): - windows_ssh_default_shell = settings.WINDOWS_SSH_DEFAULT_SHELL - def convert_to_ansible(self, asset, run_as_admin=False): info = { 'id': asset.id, @@ -33,7 +31,7 @@ class JMSBaseInventory(BaseInventory): if asset.is_windows(): info["vars"].update({ "ansible_connection": "ssh", - "ansible_shell_type": self.windows_ssh_default_shell, + "ansible_shell_type": settings.WINDOWS_SSH_DEFAULT_SHELL, }) for label in asset.labels.all(): info["vars"].update({