mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
implemented verbosity, added 5th level and now can see how many plays per playbooko if -vvvvv
This commit is contained in:
@@ -72,6 +72,7 @@ class Cli(object):
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
||||
display.verbosity = options.verbosity
|
||||
validate_conflicts(parser,options)
|
||||
|
||||
return (options, args)
|
||||
@@ -109,7 +110,7 @@ class Cli(object):
|
||||
|
||||
if options.listhosts:
|
||||
for host in hosts:
|
||||
self.display(' %s' % host.name)
|
||||
self.display.display(' %s' % host.name)
|
||||
sys.exit(0)
|
||||
|
||||
if ((options.module_name == 'command' or options.module_name == 'shell') and not options.module_args):
|
||||
@@ -163,7 +164,7 @@ class Cli(object):
|
||||
if __name__ == '__main__':
|
||||
|
||||
display = Display()
|
||||
#display.display(" ".join(sys.argv), log_only=True)
|
||||
#display.display(" ".join(sys.argv))
|
||||
|
||||
try:
|
||||
cli = Cli(display=display)
|
||||
|
||||
@@ -53,6 +53,7 @@ def main(display, args):
|
||||
parser.print_help(file=sys.stderr)
|
||||
return 1
|
||||
|
||||
display.verbosity = options.verbosity
|
||||
validate_conflicts(parser,options)
|
||||
|
||||
# Note: slightly wrong, this is written so that implicit localhost
|
||||
@@ -154,7 +155,7 @@ def main(display, args):
|
||||
if __name__ == "__main__":
|
||||
|
||||
display = Display()
|
||||
display.display(" ".join(sys.argv), log_only=True)
|
||||
#display.display(" ".join(sys.argv), log_only=True)
|
||||
|
||||
try:
|
||||
sys.exit(main(display, sys.argv[1:]))
|
||||
|
||||
Reference in New Issue
Block a user