mirror of https://github.com/jumpserver/jumpserver
fix: 修复发布机名称因含特殊字符部署失败的问题
parent
75bab70ccf
commit
621c7a31fe
|
@ -1,5 +1,6 @@
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
@ -59,7 +60,7 @@ class DeployAppletHostManager:
|
||||||
download_host = download_host.rstrip("/")
|
download_host = download_host.rstrip("/")
|
||||||
|
|
||||||
def handler(plays):
|
def handler(plays):
|
||||||
applet_host_name = self.deployment.host.name
|
applet_host_name = re.sub(r'[^a-zA-Z0-9]', '_', self.deployment.host.name)
|
||||||
hostname = '{}-{}'.format(applet_host_name, random_string(7))
|
hostname = '{}-{}'.format(applet_host_name, random_string(7))
|
||||||
for play in plays:
|
for play in plays:
|
||||||
play["vars"].update(options)
|
play["vars"].update(options)
|
||||||
|
|
Loading…
Reference in New Issue