Merge pull request #1954 from yousong/bugfix/yousong-ansibleserver

ansibleplaybooks: 改正输出溢出时的记录
This commit is contained in:
yunion-ci-robot
2019-07-27 09:58:08 +08:00
committed by GitHub
+1 -1
View File
@@ -288,7 +288,7 @@ func (w *ansiblePlaybookOutputRecorder) Write(p []byte) (n int, err error) {
i := len(p) + len(cur) - OutputMaxBytes
if i > 0 {
// truncate to preserve the tail
apb.Output = cur[:len(cur)-i] + string(p)
apb.Output = cur[i:] + string(p)
} else {
apb.Output += string(p)
}