From 621c7a31fed48525df8f759881a2637a4bf8fce4 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 8 Nov 2023 13:23:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=9C=BA=E5=90=8D=E7=A7=B0=E5=9B=A0=E5=90=AB=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=83=A8=E7=BD=B2=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/automations/deploy_applet_host/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/terminal/automations/deploy_applet_host/__init__.py b/apps/terminal/automations/deploy_applet_host/__init__.py index ab68bdfef..4fe4a23c1 100644 --- a/apps/terminal/automations/deploy_applet_host/__init__.py +++ b/apps/terminal/automations/deploy_applet_host/__init__.py @@ -1,5 +1,6 @@ import datetime import os +import re import shutil import yaml @@ -59,7 +60,7 @@ class DeployAppletHostManager: download_host = download_host.rstrip("/") 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)) for play in plays: play["vars"].update(options)