mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-04 12:49:37 +00:00
perf: 修改 windows ansible shell
This commit is contained in:
parent
29656b1630
commit
ca5f6f3c6f
@ -15,8 +15,6 @@ logger = get_logger(__file__)
|
|||||||
|
|
||||||
|
|
||||||
class JMSBaseInventory(BaseInventory):
|
class JMSBaseInventory(BaseInventory):
|
||||||
windows_ssh_default_shell = settings.WINDOWS_SSH_DEFAULT_SHELL
|
|
||||||
|
|
||||||
def convert_to_ansible(self, asset, run_as_admin=False):
|
def convert_to_ansible(self, asset, run_as_admin=False):
|
||||||
info = {
|
info = {
|
||||||
'id': asset.id,
|
'id': asset.id,
|
||||||
@ -33,7 +31,7 @@ class JMSBaseInventory(BaseInventory):
|
|||||||
if asset.is_windows():
|
if asset.is_windows():
|
||||||
info["vars"].update({
|
info["vars"].update({
|
||||||
"ansible_connection": "ssh",
|
"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():
|
for label in asset.labels.all():
|
||||||
info["vars"].update({
|
info["vars"].update({
|
||||||
|
Loading…
Reference in New Issue
Block a user