mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07: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:
parent
6275e57718
commit
74ae4b29ad
3 changed files with 50 additions and 31 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue