diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 36e989e9405..af09f02e307 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -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: diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 919d8915bba..e907bea4c5c 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -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