1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add --debug option to ansible-test.

This commit is contained in:
Matt Clay 2017-02-01 11:15:08 -08:00
parent 67646a0771
commit 309a37de86
3 changed files with 8 additions and 0 deletions

View file

@ -32,4 +32,7 @@ def ansible_environment(args):
env.update(ansible) env.update(ansible)
if args.debug:
env.update(dict(ANSIBLE_DEBUG='true'))
return env return env

View file

@ -416,6 +416,7 @@ class CommonConfig(object):
self.color = args.color # type: bool self.color = args.color # type: bool
self.explain = args.explain # type: bool self.explain = args.explain # type: bool
self.verbosity = args.verbosity # type: int self.verbosity = args.verbosity # type: int
self.debug = args.debug # type: bool
class EnvironmentConfig(CommonConfig): class EnvironmentConfig(CommonConfig):

View file

@ -132,6 +132,10 @@ def parse_args():
const='yes', const='yes',
default='auto') default='auto')
common.add_argument('--debug',
action='store_true',
help='run ansible commands in debug mode')
test = argparse.ArgumentParser(add_help=False, parents=[common]) test = argparse.ArgumentParser(add_help=False, parents=[common])
test.add_argument('include', test.add_argument('include',