From 395b624a203dfe023aadb5411ef6c97d197364a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E7=81=BF?= Date: Tue, 27 Jun 2023 11:17:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=9B=AE=E5=BD=95fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.go b/src/main.go index 9e00fbc..a3d0988 100644 --- a/src/main.go +++ b/src/main.go @@ -107,6 +107,10 @@ func initTimeZone() { } func initAnsibleHosts() { + err := os.Mkdir("/etc/ansible", os.ModePerm) + if err != nil { + fmt.Println("创建目录失败!") + } f, err := os.Create("/etc/ansible/hosts") defer f.Close() if err != nil { -- 2.26.0