From 15bd7e48dae7b9e0c542efe96feafad54904262e Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Mon, 3 Apr 2017 14:01:59 -0400 Subject: [PATCH] Add ansible executable path (argv[0]) to --version (#22262) For example: ansible 2.3.0 (argv0_in_version f53921093f) last updated 2017/03/03 13:33:31 (GMT -400) config file = /home/adrian/.ansible.cfg configured module search path = Default w/o overrides executable location = /home/adrian/src/ansible/bin/ansible This should help troubleshooting install issues. --- lib/ansible/cli/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/cli/__init__.py b/lib/ansible/cli/__init__.py index ac07d670edd..8d4819705a2 100644 --- a/lib/ansible/cli/__init__.py +++ b/lib/ansible/cli/__init__.py @@ -485,6 +485,7 @@ class CLI(with_metaclass(ABCMeta, object)): cpath = C.DEFAULT_MODULE_PATH result = result + "\n configured module search path = %s" % cpath result = result + "\n ansible python module location = %s" % ':'.join(ansible.__path__) + result = result + "\n executable location = %s" % sys.argv[0] result = result + "\n python version = %s" % ''.join(sys.version.splitlines()) return result