diff --git a/test/runner/lib/ansible_util.py b/test/runner/lib/ansible_util.py index 732c4cb76b..f0f558d1d2 100644 --- a/test/runner/lib/ansible_util.py +++ b/test/runner/lib/ansible_util.py @@ -32,4 +32,7 @@ def ansible_environment(args): env.update(ansible) + if args.debug: + env.update(dict(ANSIBLE_DEBUG='true')) + return env diff --git a/test/runner/lib/util.py b/test/runner/lib/util.py index 51d2bfe934..0326c27089 100644 --- a/test/runner/lib/util.py +++ b/test/runner/lib/util.py @@ -416,6 +416,7 @@ class CommonConfig(object): self.color = args.color # type: bool self.explain = args.explain # type: bool self.verbosity = args.verbosity # type: int + self.debug = args.debug # type: bool class EnvironmentConfig(CommonConfig): diff --git a/test/runner/test.py b/test/runner/test.py index c604258ed4..e08b6ccdcc 100755 --- a/test/runner/test.py +++ b/test/runner/test.py @@ -132,6 +132,10 @@ def parse_args(): const='yes', 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.add_argument('include',