Commit 3a78e176 authored by 魏灿's avatar 魏灿

脚本执行fix

parent 50b66429
......@@ -202,9 +202,7 @@ func (t *TaskManageSvc) ExecScript(req request.ExecScriptReq) (data interface{},
if err != nil {
return nil, resp.MarshalError.WithError(errors.New("yaml格式错误"))
}
if script["host"] == "all" {
script["host"] = fmt.Sprintf("%s%d", AnsibleGroup, req.HostGroupId)
}
script["host"] = fmt.Sprintf("%s%d", AnsibleGroup, req.HostGroupId)
j, err := json.Marshal(script)
if err != nil {
return nil, resp.MarshalError.WithError(err)
......
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