Skip to content

Commit 5c2aaa0

Browse files
authored
Merge pull request #812 from mhrivnak/runner-output-on-failure
pkg/ansible/runner: logs the stdout and stderr from ansible-runner if…
2 parents d4a7b31 + 506c60f commit 5c2aaa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ansible/runner/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ func (r *runner) Run(ident string, u *unstructured.Unstructured, kubeconfig stri
245245
dc = r.cmdFunc(ident, inputDir.Path)
246246
}
247247

248-
err := dc.Run()
248+
output, err := dc.CombinedOutput()
249249
if err != nil {
250-
logger.Error(err, "error from ansible-runner")
250+
logger.Error(err, string(output))
251251
} else {
252252
logger.Info("ansible-runner exited successfully")
253253
}

0 commit comments

Comments
 (0)