fix: 修复发布机名称因含特殊字符部署失败的问题

pull/12063/head
Eric 2023-11-08 13:23:40 +08:00 committed by Eric_Lee
parent 75bab70ccf
commit 621c7a31fe
1 changed files with 2 additions and 1 deletions

View File

@ -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)