Split -vv from -vvv

This commit is contained in:
Michael DeHaan 2012-08-08 21:16:48 -04:00
parent cac4effd8f
commit 85ba71a7fe
2 changed files with 9 additions and 3 deletions

View file

@ -28,8 +28,14 @@ if os.path.exists("/usr/bin/cowsay"):
elif os.path.exists("/usr/games/cowsay"):
cowsay = "/usr/games/cowsay"
def vv(msg, host=None):
return verbose(msg, host=host, caplevel=1)
def vvv(msg, host=None):
if utils.VERBOSITY > 2:
return verbose(msg, host=host, caplevel=2)
def verbose(msg, host=None, caplevel=2):
if utils.VERBOSITY > caplevel:
if host is None:
print stringc(msg, 'blue')
else:

View file

@ -37,7 +37,7 @@ from ansible import errors
from ansible import module_common
import poller
import connection
from ansible.callbacks import DefaultRunnerCallbacks, vvv
from ansible.callbacks import DefaultRunnerCallbacks, vv, vvv
HAS_ATFORK=True
try:
@ -249,7 +249,7 @@ class Runner(object):
module_name = 'command'
self.module_args += " #USE_SHELL"
vvv("ARGS %s" % self.module_args, host=conn.host)
vv("REMOTE_MODULE %s %s" % (module_name, self.module_args), host=conn.host)
exec_rc = self._execute_module(conn, tmp, module_name, self.module_args, inject=inject)
return exec_rc