Commit 395b624a authored by 魏灿's avatar 魏灿

创建目录fix

parent f183a585
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment