mirror of https://github.com/jumpserver/jumpserver
parent
e00c804a5a
commit
c981e9cd9f
|
@ -16,7 +16,7 @@ class SecretGenerator:
|
|||
|
||||
@staticmethod
|
||||
def generate_ssh_key():
|
||||
private_key, public_key = ssh_key_gen()
|
||||
private_key, __ = ssh_key_gen()
|
||||
return private_key
|
||||
|
||||
def generate_password(self):
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# ~*~ coding: utf-8 ~*~
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from collections import defaultdict
|
||||
|
||||
from django.utils.translation import gettext as _
|
||||
|
@ -159,7 +160,7 @@ class JMSInventory:
|
|||
protocol = self.get_primary_protocol(ansible_config, protocols)
|
||||
|
||||
tp, category = asset.type, asset.category
|
||||
name = asset.name.replace(' ', '_').replace('[', '_').replace(']', '_')
|
||||
name = re.sub(r'[ \[\]/]', '_', asset.name)
|
||||
secret_info = {k: v for k, v in asset.secret_info.items() if v}
|
||||
host = {
|
||||
'name': name,
|
||||
|
|
Loading…
Reference in New Issue