mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Add a debug attribute to Runner/Playbook.
This prints the stderr of the executed modules on local stderr. Most methods on Runner now return a fourth "err" parameter.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#######################################################
|
||||
|
||||
import utils
|
||||
import sys
|
||||
|
||||
#######################################################
|
||||
|
||||
@@ -146,6 +147,9 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
|
||||
else:
|
||||
print "ok: [%s] => %s\n" % (host, invocation)
|
||||
|
||||
def on_error(self, host, err):
|
||||
print >>sys.stderr, "stderr: [%s] => %s\n" % (host, err)
|
||||
|
||||
def on_skipped(self, host):
|
||||
print "skipping: [%s]\n" % host
|
||||
|
||||
|
||||
Reference in New Issue
Block a user