mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-05 07:49:10 -07:00
Split -vv from -vvv
This commit is contained in:
parent
cac4effd8f
commit
85ba71a7fe
2 changed files with 9 additions and 3 deletions
|
@ -28,8 +28,14 @@ if os.path.exists("/usr/bin/cowsay"):
|
||||||
elif os.path.exists("/usr/games/cowsay"):
|
elif os.path.exists("/usr/games/cowsay"):
|
||||||
cowsay = "/usr/games/cowsay"
|
cowsay = "/usr/games/cowsay"
|
||||||
|
|
||||||
|
def vv(msg, host=None):
|
||||||
|
return verbose(msg, host=host, caplevel=1)
|
||||||
|
|
||||||
def vvv(msg, host=None):
|
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:
|
if host is None:
|
||||||
print stringc(msg, 'blue')
|
print stringc(msg, 'blue')
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -37,7 +37,7 @@ from ansible import errors
|
||||||
from ansible import module_common
|
from ansible import module_common
|
||||||
import poller
|
import poller
|
||||||
import connection
|
import connection
|
||||||
from ansible.callbacks import DefaultRunnerCallbacks, vvv
|
from ansible.callbacks import DefaultRunnerCallbacks, vv, vvv
|
||||||
|
|
||||||
HAS_ATFORK=True
|
HAS_ATFORK=True
|
||||||
try:
|
try:
|
||||||
|
@ -249,7 +249,7 @@ class Runner(object):
|
||||||
module_name = 'command'
|
module_name = 'command'
|
||||||
self.module_args += " #USE_SHELL"
|
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)
|
exec_rc = self._execute_module(conn, tmp, module_name, self.module_args, inject=inject)
|
||||||
return exec_rc
|
return exec_rc
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue