mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
Add -vvv support for debugging activity
This commit is contained in:
parent
c82f06258c
commit
846186e2fc
10 changed files with 39 additions and 14 deletions
|
@ -28,6 +28,13 @@ if os.path.exists("/usr/bin/cowsay"):
|
|||
elif os.path.exists("/usr/games/cowsay"):
|
||||
cowsay = "/usr/games/cowsay"
|
||||
|
||||
def vvv(msg, host=None):
|
||||
if utils.VERBOSITY > 2:
|
||||
if host is None:
|
||||
print stringc(msg, 'blue')
|
||||
else:
|
||||
print stringc("<%s> %s" % (host, msg), 'blue')
|
||||
|
||||
class AggregateStats(object):
|
||||
''' holds stats about per-host activity during playbook runs '''
|
||||
|
||||
|
@ -242,11 +249,11 @@ class CliRunnerCallbacks(DefaultRunnerCallbacks):
|
|||
class PlaybookRunnerCallbacks(DefaultRunnerCallbacks):
|
||||
''' callbacks used for Runner() from /usr/bin/ansible-playbook '''
|
||||
|
||||
def __init__(self, stats, verbose=False):
|
||||
def __init__(self, stats, verbose=utils.VERBOSITY):
|
||||
|
||||
self.verbose = verbose
|
||||
self.stats = stats
|
||||
self._async_notified = {}
|
||||
self.verbose = verbose
|
||||
|
||||
def on_unreachable(self, host, msg):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue